public int findScore(State state, 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();
		int bestScore = colorToPlay == 'X' ? -101 : 101; //Initialize best score as impossibly low/high depending on player for comparison 
		for (int currentMove : legalMoves) {
			State copy = state.copy();
			copy.play(currentMove);
			int score = findScore(copy, depth + 1, State.opposite(colorToPlay)); //Search down until leaf, then return scores up
			if (colorToPlay == 'X') { 											//Once have score, compare for max or min and set to best
				bestScore = Math.max(score, bestScore);
			} else {
				bestScore = Math.min(score, bestScore);
			}
		}
		return bestScore;
	}