@Override
	public Move getMove(Board board){
		for(int i=0; i<Board.SIZE; i++){
			for(int j=0; j<Board.SIZE; j++){
				if(board.validMove(i, j, color))
					moves.add(new Move(i,j));
			}
		}
		
		if(moves.isEmpty())
			return null;
		
		Move optimalMove = moves.get(0);
		char opponent = color == 'W' ? 'B' : 'W';
		double maxScore = getScore(board, optimalMove, color, opponent);
		
		for(int i=1; i<moves.size(); i++){
			Move move = moves.get(i);
			double score = getScore(board, move, color, opponent);
			
			if(score > maxScore){
				maxScore = score;
				optimalMove = move;
			}
		}
		
		moves.clear();
		return optimalMove;
	}