private int findScore(State state, int alpha, int beta, int depth, char colorToPlay) {
		nodeCount++;
		if (depth == maxSearchDepth) { //Once at leaf, return the score of that state
			return state.score();
		}

		List<Integer> legalMoves = state.legalMoves();
		if (colorToPlay == 'X') {
			for (int currentMove : legalMoves) {
				State copy = state.copy();
				copy.play(currentMove); 
				alpha = Math.max(alpha,
						findScore(copy, alpha, beta, depth + 1, State.opposite(colorToPlay))); //Find the best score we can from here recursively
				if (beta <= alpha) { // If this move is too good to reach, don't analyze from here. Cut this node off. 
					break;
				}
			}
			return alpha; //Otherwise return this score 
		}
		//Do the same as above from perspective of min player
		for (int currentMove : legalMoves) {
			State copy = state.copy();
			copy.play(currentMove);
			beta = Math.min(beta,
					findScore(copy, alpha, beta, depth + 1, State.opposite(colorToPlay)));
			if (beta <= alpha) { 
				break;
			}
		}
		return beta;
	}