jago-server/src/main/java/jago/server/models/Server.java
public void listenSocket() {
		try {
			while (true) {
				client = server.accept();
				HumanPlayer player = new HumanPlayer(client);
				String line = player.getLine();
				String[] com = line.split(" ");
				int whatSize = Integer.parseInt(com[1]);
				System.out.println(com[0]);
				if (com[0].equals("h")) {
					if (waiter[BoardSize.indexBoardSize(whatSize)] == null) {
						waiter[BoardSize.indexBoardSize(whatSize)] = player;
					} else {
						Game newGame = new Game(waiter[BoardSize.indexBoardSize(whatSize)], player,
								BoardSize.getBoardSize(whatSize));
						newGame.start();
						waiter[BoardSize.indexBoardSize(whatSize)] = null;
					}
				} else {
					Game newGame = new Game(player, new BotPlayer(whatSize), BoardSize.getBoardSize(whatSize));
					newGame.start();
				}
			}
		} catch (IOException e) {
			System.out.println("Could not accept client");
			System.exit(-1);
		} finally {
			cleanup();
		}

	}
/**
	 * Listen and when somebody connect read with another human or bot and size
	 * of wanted board
	 */
Listen and when somebody connect read with another human or bot and size
of wanted board
Listen and when somebody connect read with another human or bot and size of wanted board
public void listenSocket() {
		try {
			while (true) {
				client = server.accept();
				HumanPlayer player = new HumanPlayer(client);
				String line = player.getLine();
				String[] com = line.split(" ");
				int whatSize = Integer.parseInt(com[1]);
				System.out.println(com[0]);
				if (com[0].equals("h")) {
					if (waiter[BoardSize.indexBoardSize(whatSize)] == null) {
						waiter[BoardSize.indexBoardSize(whatSize)] = player;
					} else {
						Game newGame = new Game(waiter[BoardSize.indexBoardSize(whatSize)], player,
								BoardSize.getBoardSize(whatSize));
						newGame.start();
						waiter[BoardSize.indexBoardSize(whatSize)] = null;
					}
				} else {
					Game newGame = new Game(player, new BotPlayer(whatSize), BoardSize.getBoardSize(whatSize));
					newGame.start();
				}
			}
		} catch (IOException e) {
			System.out.println("Could not accept client");
			System.exit(-1);
		} finally {
			cleanup();
		}
	}
public void listenSocket ( ) { try { while ( true ) { client = server . accept ( ) ; HumanPlayer player = new HumanPlayer ( client ) ; String line = player . getLine ( ) ; String [ ] com = line . split ( " " ) ; int whatSize = Integer . parseInt ( com [ 1 ] ) ; System . out . println ( com [ 0 ] ) ; if ( com [ 0 ] . equals ( "h" ) ) { if ( waiter [ BoardSize . indexBoardSize ( whatSize ) ] == null ) { waiter [ BoardSize . indexBoardSize ( whatSize ) ] = player ; } else { Game newGame = new Game ( waiter [ BoardSize . indexBoardSize ( whatSize ) ] , player , BoardSize . getBoardSize ( whatSize ) ) ; newGame . start ( ) ; waiter [ BoardSize . indexBoardSize ( whatSize ) ] = null ; } } else { Game newGame = new Game ( player , new BotPlayer ( whatSize ) , BoardSize . getBoardSize ( whatSize ) ) ; newGame . start ( ) ; } } } catch ( IOException e ) { System . out . println ( "Could not accept client" ) ; System . exit ( - 1 ) ; } finally { cleanup ( ) ; } }
Listen and when somebody connect read with another human or bot and size
 of wanted board
Listen and when somebody connect read with another human or bot and size of wanted board