@Override
	public ReversiInput inputForHuman(ReversiPlayer human) throws IOException {

		ReversiInput reversiInput = null;
		Scanner scanner = human.getInputScanner();

		boolean validMove = false;
		boolean validInput = false;

		while (!validMove) {
			
			String input = scanner.nextLine();
			ReversiCommand command = parser.parseCommand(input);

			switch (command.getType()) {
				case Move: {
					
					List<String> parameters = command.getParameters();
					String column = parameters.get(0);
					String row = parameters.get(1);
					
					try{
						Integer rowInteger = new Integer(row);
						Position position = new Position(column, rowInteger);
						reversiInput = new ReversiInput(human, position);
						validMove = true;
						validInput = true;
					}catch(NumberFormatException e){
						validMove = false;
						validInput = false;
					}
				}
					break;
				case Display: {
					human.toggleAsciiDisplay();
					validInput = true;
					validMove = false;
					ReversiServerResponse.sendOk(human);
				} break;
				case Undo:
				case Redo: {
					reversiInput = new ReversiInput(human, command);
					validInput = true;
					validMove = true;
				} break;
				case Exit: {
					throw new ExitException(human);
				}
				default: break;
			}
			
			if(validInput == false){
				ReversiServerResponse.sendIllegal(human);
			}
		}
		
		return reversiInput;
	}