public void init(){
		String incoming = null;
		int currentIndex = 0;
		BufferedReader input;
		Socket connectionSocket;
		boolean rulesSend = false;
		try{
			serverSocket = new ServerSocket(port);
		
			System.out.println("Server is running at port " +port);
			
			while(true){
				try{
					if(serverSocket.isClosed()){
						serverSocket = new ServerSocket(port);
						connectionSocket = serverSocket.accept();
						input = new BufferedReader(new InputStreamReader(connectionSocket.
							   getInputStream()));
					}
					
					//are listening to
					connectionSocket = serverSocket.accept();
					
					
					//Read the request from the client from the socket interface
					//into the buffer.
					input = new BufferedReader(new InputStreamReader(connectionSocket.
							getInputStream()));
					
					/* 
					 * magic number
					 * 26 is the number of letters in Latin alphabet 
					 */
					if(clients.size()>=26){
						PrintStream os = new PrintStream(connectionSocket.getOutputStream());
			            os.println(EXIT);
			            os.close();
			            System.out.println("Closing socket");
			            connectionSocket.close();
					}

					incoming = input.readLine();

					if(incoming.matches(PLAYER_NAME_PREFIX+".+")){
						incoming = incoming.substring(incoming.indexOf(";")+1);
						Connection c = new Connection(connectionSocket, incoming, ++playerID);
						c.playerSymbol = symbols[symbolIndex];
						++symbolIndex;
						PlayerData p = new PlayerData(c.playerName, c.playerSymbol, c.playerID);
						playerList.put(c.playerID, p);
						clients.add(c);
						incoming=null;
					}
					
					if(clients.size()>=2){
						if(!rulesSend){
							sendRulesToPlayers();
							rulesSend = true;
						}
						playTheGame(nextPlayer());
					}
					
					if(clients.size()>2){
						// add new player and send him game rules
						String tempSymbol=getNewSymbol();
						Connection player = clients.get(currentIndex);
					
						clients.get(currentIndex).playerSymbol = tempSymbol;
						
						addPlayer(clients.get(currentIndex));
						player.send("#"+Integer.toString(size));
						player.send("#"+Integer.toString(symNum));
						player.send("#"+Integer.toString(player.playerID));
						player.send("#"+tempSymbol);
						sendMessageToPlayers(NEW_PLAYER+";"+player.playerName+";"+player.playerID+";"+player.playerSymbol, player);
					}
					currentIndex++;
				}catch(Exception e){
					System.out.println("Error: EXCEPTION");
					System.out.println("Error: CAUSE: "+e.getCause());
					e.printStackTrace();
				}
			}
		
		}catch(IOException e){
			System.out.println("ERROR: \n"+e.getMessage());
		}
	}