jago-server/src/main/java/jago/server/models/HumanPlayer.java
@Override
	public void makeMove() {
		String line;
		int x, y;
		try {
			do {
				out.println("y");
				line = in.readLine();
			} while (line == null);
			String[] com = line.split(" ");
			switch (com[0]) {
			case "p": // place stone
				x = Integer.parseInt(com[1]);
				y = Integer.parseInt(com[2]);
				myGame.move(x, y);
				break;
			case "t": // pass turn
				myGame.pass();
				break;
			case "f": // forfeit
				myGame.forfeit();
				break;
			case "r": // rematch
				myGame.rematch();
			default:
				break;
			}
		} catch (IOException e) {
			System.out.println("error");
			cleanup();
			myGame.error();
		}
	}
/**
	 * Make move and report that to game by method in game.
	 */
Make move and report that to game by method in game.
Make move and report that to game by method in game .
@Override
	public void makeMove() {
		String line;
		int x, y;
		try {
			do {
				out.println("y");
				line = in.readLine();
			} while (line == null);
			String[] com = line.split(" ");
			switch (com[0]) {
			case "p": 
				x = Integer.parseInt(com[1]);
				y = Integer.parseInt(com[2]);
				myGame.move(x, y);
				break;
			case "t": 
				myGame.pass();
				break;
			case "f": 
				myGame.forfeit();
				break;
			case "r": 
				myGame.rematch();
			default:
				break;
			}
		} catch (IOException e) {
			System.out.println("error");
			cleanup();
			myGame.error();
		}
	}
@ Override public void makeMove ( ) { String line ; int x , y ; try { do { out . println ( "y" ) ; line = in . readLine ( ) ; } while ( line == null ) ; String [ ] com = line . split ( " " ) ; switch ( com [ 0 ] ) { case "p" : x = Integer . parseInt ( com [ 1 ] ) ; y = Integer . parseInt ( com [ 2 ] ) ; myGame . move ( x , y ) ; break ; case "t" : myGame . pass ( ) ; break ; case "f" : myGame . forfeit ( ) ; break ; case "r" : myGame . rematch ( ) ; default : break ; } } catch ( IOException e ) { System . out . println ( "error" ) ; cleanup ( ) ; myGame . error ( ) ; } }
Make move and report that to game by method in game.
Make move and report that to game by method in game .
// place stone // pass turn // forfeit // rematch