public MyPair<List<List<FpgaInternalMove>>,List<MyPair<FpgaInternalState,List<FpgaInternalMove>>>> getNextStates(FpgaInternalState state){
		if(this.theMachine.isTerminal(state.getCompactMachineState())) {
			return null;
		}
		// Retrieve all legal moves
		List<List<CompactMove>> movesForAllRoles;
		try {
			movesForAllRoles = this.theMachine.getAllLegalMoves(state.getCompactMachineState());
		} catch (MoveDefinitionException e) {
			GamerLogger.logError("StateMachine", "[FakeFPGALibrary] Error when getting all legal moves!");
			throw new RuntimeException("StateMachine - [FakeFPGALibrary] Error when getting all legal moves!");
		}
		List<List<FpgaInternalMove>> internalMovesForAllRoles = new ArrayList<List<FpgaInternalMove>>();
		for(List<CompactMove> movesForOneRole : movesForAllRoles) {
			List<FpgaInternalMove> internalMovesForOneRole = new ArrayList<FpgaInternalMove>();
			for(CompactMove move : movesForOneRole) {
				internalMovesForOneRole.add(new FpgaInternalMove(move));
			}
			internalMovesForAllRoles.add(internalMovesForOneRole);
		}
		// Retrieve all joint moves and next states
		List<List<CompactMove>> allJointMoves;
		try {
			allJointMoves = this.theMachine.getLegalJointMoves(state.getCompactMachineState());
		} catch (MoveDefinitionException | StateMachineException e) {
			GamerLogger.logError("StateMachine", "[FakeFPGALibrary] Error when getting all legal joint moves!");
			throw new RuntimeException("StateMachine - [FakeFPGALibrary] Error when getting all legal joint moves!");
		}
		List<MyPair<FpgaInternalState,List<FpgaInternalMove>>> internalJointMovesAndNextStates = new ArrayList<MyPair<FpgaInternalState,List<FpgaInternalMove>>>();
		CompactMachineState nextState;
		if(allJointMoves == null) {
			System.out.println("Null joint moves");
		}
		for(List<CompactMove> jointMove : allJointMoves) {
			nextState = this.theMachine.getCompactNextState(state.getCompactMachineState(), jointMove);
			List<FpgaInternalMove> internalJointMove = new ArrayList<FpgaInternalMove>();
			for(CompactMove move : jointMove) {
				internalJointMove.add(new FpgaInternalMove(move));
			}
			internalJointMovesAndNextStates.add(new MyPair<FpgaInternalState,List<FpgaInternalMove>>(new FpgaInternalState(nextState), internalJointMove));
		}
		return new MyPair<List<List<FpgaInternalMove>>,List<MyPair<FpgaInternalState,List<FpgaInternalMove>>>>(internalMovesForAllRoles, internalJointMovesAndNextStates);
	}
public MyPair<List<List<FpgaInternalMove>>,List<MyPair<FpgaInternalState,List<FpgaInternalMove>>>> getNextStates(FpgaInternalState state){
		if(this.theMachine.isTerminal(state.getCompactMachineState())) {
			return null;
		}
	
		List<List<CompactMove>> movesForAllRoles;
		try {
			movesForAllRoles = this.theMachine.getAllLegalMoves(state.getCompactMachineState());
		} catch (MoveDefinitionException e) {
			GamerLogger.logError("StateMachine", "[FakeFPGALibrary] Error when getting all legal moves!");
			throw new RuntimeException("StateMachine - [FakeFPGALibrary] Error when getting all legal moves!");
		}
		List<List<FpgaInternalMove>> internalMovesForAllRoles = new ArrayList<List<FpgaInternalMove>>();
		for(List<CompactMove> movesForOneRole : movesForAllRoles) {
			List<FpgaInternalMove> internalMovesForOneRole = new ArrayList<FpgaInternalMove>();
			for(CompactMove move : movesForOneRole) {
				internalMovesForOneRole.add(new FpgaInternalMove(move));
			}
			internalMovesForAllRoles.add(internalMovesForOneRole);
		}
	
		List<List<CompactMove>> allJointMoves;
		try {
			allJointMoves = this.theMachine.getLegalJointMoves(state.getCompactMachineState());
		} catch (MoveDefinitionException | StateMachineException e) {
			GamerLogger.logError("StateMachine", "[FakeFPGALibrary] Error when getting all legal joint moves!");
			throw new RuntimeException("StateMachine - [FakeFPGALibrary] Error when getting all legal joint moves!");
		}
		List<MyPair<FpgaInternalState,List<FpgaInternalMove>>> internalJointMovesAndNextStates = new ArrayList<MyPair<FpgaInternalState,List<FpgaInternalMove>>>();
		CompactMachineState nextState;
		if(allJointMoves == null) {
			System.out.println("Null joint moves");
		}
		for(List<CompactMove> jointMove : allJointMoves) {
			nextState = this.theMachine.getCompactNextState(state.getCompactMachineState(), jointMove);
			List<FpgaInternalMove> internalJointMove = new ArrayList<FpgaInternalMove>();
			for(CompactMove move : jointMove) {
				internalJointMove.add(new FpgaInternalMove(move));
			}
			internalJointMovesAndNextStates.add(new MyPair<FpgaInternalState,List<FpgaInternalMove>>(new FpgaInternalState(nextState), internalJointMove));
		}
		return new MyPair<List<List<FpgaInternalMove>>,List<MyPair<FpgaInternalState,List<FpgaInternalMove>>>>(internalMovesForAllRoles, internalJointMovesAndNextStates);
	}
public mypair<list<list<fpgainternalmove>>,list<mypair<fpgainternalstate,list<fpgainternalmove>>>> getnextstates(fpgainternalstate state){ if(this.themachine.isterminal(state.getcompactmachinestate())) { return null; } list<list<compactmove>> movesforallroles; try { movesforallroles = this.themachine.getalllegalmoves(state.getcompactmachinestate()); } catch (movedefinitionexception e) { gamerlogger.logerror("statemachine", "[fakefpgalibrary] error when getting all legal moves!"); throw new runtimeexception("statemachine - [fakefpgalibrary] error when getting all legal moves!"); } list<list<fpgainternalmove>> internalmovesforallroles = new arraylist<list<fpgainternalmove>>(); for(list<compactmove> movesforonerole : movesforallroles) { list<fpgainternalmove> internalmovesforonerole = new arraylist<fpgainternalmove>(); for(compactmove move : movesforonerole) { internalmovesforonerole.add(new fpgainternalmove(move)); } internalmovesforallroles.add(internalmovesforonerole); } list<list<compactmove>> alljointmoves; try { alljointmoves = this.themachine.getlegaljointmoves(state.getcompactmachinestate()); } catch (movedefinitionexception | statemachineexception e) { gamerlogger.logerror("statemachine", "[fakefpgalibrary] error when getting all legal joint moves!"); throw new runtimeexception("statemachine - [fakefpgalibrary] error when getting all legal joint moves!"); } list<mypair<fpgainternalstate,list<fpgainternalmove>>> internaljointmovesandnextstates = new arraylist<mypair<fpgainternalstate,list<fpgainternalmove>>>(); compactmachinestate nextstate; if(alljointmoves == null) { system.out.println("null joint moves"); } for(list<compactmove> jointmove : alljointmoves) { nextstate = this.themachine.getcompactnextstate(state.getcompactmachinestate(), jointmove); list<fpgainternalmove> internaljointmove = new arraylist<fpgainternalmove>(); for(compactmove move : jointmove) { internaljointmove.add(new fpgainternalmove(move)); } internaljointmovesandnextstates.add(new mypair<fpgainternalstate,list<fpgainternalmove>>(new fpgainternalstate(nextstate), internaljointmove)); } return new mypair<list<list<fpgainternalmove>>,list<mypair<fpgainternalstate,list<fpgainternalmove>>>>(internalmovesforallroles, internaljointmovesandnextstates); }