* @throws SimulatorException if there is an error thrown by the adapter.
* Most likely because of invalid player or community configurations
*/
private void runSinglePlayerSimulations() throws SimulatorException {
HoleCards cards;
//Create the results array. All players have result records created
//even if they are inactive or folded, so use total, not active Players
playerResults = new PlayerResults[ totalPlayers ];
//Process each player in a loop. Create a results object to store the
//current results, check if the player is inactive or folded, then if
//they are active run the single player simulation using just their
//HoleCards. Finally, add the current player result to the results
//array, regardless of the player state.
for ( int ii = 0; ii < totalPlayers; ii++ ) {
//Create a new Player Results object to store info for the current player
currResult = getNewPlayerResult( ii+1 );
//Get the next set of hole cards in the player array
cards = playerCards[ii];
//If there were multiple active players in the hand set the perfect
//win percent using the player game stats helper
if ( activePlayers > 1 )
currResult.setPerfectWinPct( playerGameStatsHelper.getPlayerProb(ii) * PCT_MULT );
//Make sure the player is active before calculating their results
if ( cards == null )
//The player was never assigned cards, they are just a place
//holder for calculating player vs player results
currResult.setPlayerState( TransportUtils.PLAYER_EMPTY );
else if ( cards.isFolded() )
//The player was assigned known cards, but folded. This
//changes the perfect win % calculations, but it treated
//the same as an empty player for imperfect calculations
currResult.setPlayerState( TransportUtils.PLAYER_FOLDED );
else