public boolean isLegalMove(Move move, PlayerColor color){
		if (move == null){
			return false;
		} else if (move.equals(Move.getMoveInstance(MoveType.PASS, 0, 0))){
			return true;
		}
		Boolean boardLegal = board.isLegalMove(move, color);
		MoveResult last = moveHistory.peekFirst();
		Boolean retakingKo = last != null && last.captured.size() == 1 && 
				board.getStoneGroupLibertiesAtLocation(last.move.getX(), last.move.getY()) == 1 &&
				move.getX().equals(last.captured.iterator().next().x_location) &&
				move.getY().equals(last.captured.iterator().next().y_location);
		
		return boardLegal && !retakingKo;
	}