src/strategy/Parity3.java
private static TreeMap<Integer,TreeSet<Integer>> solve(Game game) {
		TreeMap<Integer,TreeSet<Integer>> allowed = new TreeMap<Integer,TreeSet<Integer>>();
		
		TreeSet<Integer> remaining = new TreeSet<Integer>(game.states.keySet());
		Boolean wrnonzero;
		Boolean winning = false;
		
		do {
			wrnonzero = false;
			TreeSet<Integer> onetwosubgame = findOneTwoSubgame(game, remaining);
			TreeSet<Integer> p2winningregion = solveOneTwoSubgame(game, onetwosubgame, allowed);
			
			if (p2winningregion.size() > 0) {
				wrnonzero = true;
				TreeSet<Integer> p2reacheswr = p2reachesWR(game, remaining, p2winningregion, allowed);
				if (p2winningregion.contains(game.initialState) || p2reacheswr.contains(game.initialState))
					winning = true;
				remaining.removeAll(p2winningregion);
				remaining.removeAll(p2reacheswr);
			}
		} while (wrnonzero && remaining.size() > 0);

		if (winning)
			return allowed;
		else
			return null;
	}
/**
	 * Solves the game and gives the strategy to the main method <br>
	 * as long as the initial state is in the winning regions
	 * @param game	The entire game
	 * @return		Player 2 strategy
	 */
Solves the game and gives the strategy to the main method 
as long as the initial state is in the winning regions
@param game  The entire game
@return              Player 2 strategy
Solves the game and gives the strategy to the main method as long as the initial state is in the winning regions @param game The entire game @return Player 2 strategy
private static TreeMap<Integer,TreeSet<Integer>> solve(Game game) {
		TreeMap<Integer,TreeSet<Integer>> allowed = new TreeMap<Integer,TreeSet<Integer>>();
		TreeSet<Integer> remaining = new TreeSet<Integer>(game.states.keySet());
		Boolean wrnonzero;
		Boolean winning = false;
		do {
			wrnonzero = false;
			TreeSet<Integer> onetwosubgame = findOneTwoSubgame(game, remaining);
			TreeSet<Integer> p2winningregion = solveOneTwoSubgame(game, onetwosubgame, allowed);
			if (p2winningregion.size() > 0) {
				wrnonzero = true;
				TreeSet<Integer> p2reacheswr = p2reachesWR(game, remaining, p2winningregion, allowed);
				if (p2winningregion.contains(game.initialState) || p2reacheswr.contains(game.initialState))
					winning = true;
				remaining.removeAll(p2winningregion);
				remaining.removeAll(p2reacheswr);
			}
		} while (wrnonzero && remaining.size() > 0);
		if (winning)
			return allowed;
		else
			return null;
	}
private static TreeMap < Integer , TreeSet < Integer > > solve ( Game game ) { TreeMap < Integer , TreeSet < Integer > > allowed = new TreeMap < Integer , TreeSet < Integer > > ( ) ; TreeSet < Integer > remaining = new TreeSet < Integer > ( game . states . keySet ( ) ) ; Boolean wrnonzero ; Boolean winning = false ; do { wrnonzero = false ; TreeSet < Integer > onetwosubgame = findOneTwoSubgame ( game , remaining ) ; TreeSet < Integer > p2winningregion = solveOneTwoSubgame ( game , onetwosubgame , allowed ) ; if ( p2winningregion . size ( ) > 0 ) { wrnonzero = true ; TreeSet < Integer > p2reacheswr = p2reachesWR ( game , remaining , p2winningregion , allowed ) ; if ( p2winningregion . contains ( game . initialState ) || p2reacheswr . contains ( game . initialState ) ) winning = true ; remaining . removeAll ( p2winningregion ) ; remaining . removeAll ( p2reacheswr ) ; } } while ( wrnonzero && remaining . size ( ) > 0 ) ; if ( winning ) return allowed ; else return null ; }
Solves the game and gives the strategy to the main method <br>
 as long as the initial state is in the winning regions
 @param game  The entire game
 @return              Player 2 strategy
Solves the game and gives the strategy to the main method <br > as long as the initial state is in the winning regions @param game The entire game @return Player 2 strategy