@Override
	public int move(State state) {
		// Return the move with the best score
		int bestMove = -1;
		char color = state.getColorToPlay();
		int bestScore = color == 'X' ? -101 : 101;
		for (int child : state.legalMoves()) {
			State copy = state.copy();
			copy.play(child);
			int score = findScore(copy, -101, 101, 1, State.opposite(color));
			if (color == 'X') {
				if (score > bestScore) { //If this play has the best score, store the move for return
					bestScore = score;
					bestMove = child;
				}
			} else {
				if (score < bestScore) { //Same for player2
					bestScore = score;
					bestMove = child;
				}
			}
		}
		return bestMove;
	}