// Retrieve all legal moves
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);
	}
return null;
}
// Retrieve all legal moves
List<List<CompactMove>> movesForAllRoles;
try {
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>();
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) {