com.javaflair.pokerprophesier.api.helper
Class PlayerGameStatsHelper

java.lang.Object
  extended by com.javaflair.pokerprophesier.api.helper.PlayerGameStatsHelper

public class PlayerGameStatsHelper
extends Object

A helper which contains the probabilities of each player winning/tying the game. The probabilities are determined by performing a set number of simulations, using randomly generated cards and evaluating the resulting hands.

The helper can not be instantiated directly, rather a reference must be retrieved from the PokerProphesierAdapter after the PokerProphesierAdapter.runPlayerSimulations(HoleCards[], CommunityCards, int) simulator method is executed.

The helper is populated in all game states.

Author:
Javaflair
See Also:
PokerProphesierAdapter, PokerProphesierAdapter.getPlayerGameStatsHelper()

Field Summary
static float PLAYER_EMPTY
          Constant indicating that the player position is empty.
static float PLAYER_FOLDED
          Constant indicating that the player has folded.
 
Method Summary
 int getNumSimPlayers()
          Returns the number of simulator players in the game.
 int getNumSimulations()
          Returns the number of simulations used to determine the probabilities.
 float getPlayerProb(int index)
          Returns the winning/tied probability for the player at the specified index.
 float[] getPlayerProbs()
          Returns the winning/tied probabilities for all players as an array.
 int getWinningPlayerIndex()
          Returns the index of the winning player.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLAYER_FOLDED

public static final float PLAYER_FOLDED
Constant indicating that the player has folded.

See Also:
Constant Field Values

PLAYER_EMPTY

public static final float PLAYER_EMPTY
Constant indicating that the player position is empty.

See Also:
Constant Field Values
Method Detail

getNumSimPlayers

public int getNumSimPlayers()
Returns the number of simulator players in the game.

Returns:
the number of players

getNumSimulations

public int getNumSimulations()
Returns the number of simulations used to determine the probabilities.

Returns:
the number of simulations

getPlayerProb

public float getPlayerProb(int index)
Returns the winning/tied probability for the player at the specified index.

Parameters:
index - the index of the player (starts from 0)
Returns:
the probabilty, PLAYER_FOLDED or PLAYER_EMPTY

getPlayerProbs

public float[] getPlayerProbs()
Returns the winning/tied probabilities for all players as an array.

Returns:
the array of probabilities

getWinningPlayerIndex

public int getWinningPlayerIndex()
Returns the index of the winning player.

Returns:
the index (starts from 0)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006 Javaflair. All Rights Reserved.