Interface ITreeBuildingScript
General scripting API
Users can write simple scripts to to fully customize the game tree in HRC. During the tree building process HRC queries the script to decide which actions should be added to the game tree at any decision point. The tree creation process will automatically handle the general game rules, such as the order to act and the legal actions and bet sizes. The values returned by the user script should depend only on the game state as provided by the IDecisionContext parameter.
This Java interface is for reference only, the actual tree building scripts have to be written in JavaScript.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IPlayerAction.ActionType
static final IPlayerAction.ActionType
static final int
static final IPlayerAction.ActionType
static final int
static final IPlayerAction.ActionType
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests whether the current player is allowed to limp or flat call Preflop.long[]
Calculates the bet or raise sizings for a Postflop decision.long[]
Calculates raise sizings for a Preflop decision.boolean
Tests whether betting can take place on the following streets.
-
Field Details
-
FOLD
-
CHECK
-
CALL
-
RAISE
-
PREFLOP
static final int PREFLOP- See Also:
-
FLOP
static final int FLOP- See Also:
-
TURN
static final int TURN- See Also:
-
RIVER
static final int RIVER- See Also:
-
-
Method Details
-
getSizingsPreflop
Calculates raise sizings for a Preflop decision. Raise amounts are specified as raise-to.Negative amounts will be discarded by the tree builder. All other amounts will be adjusted to satisfy the minimum legal sizing and to be no larger than a raise for effective stacks.
- Parameters:
ctx
- game state for the current decision point- Returns:
- Array of zero or more sizings in 1/100th of chips
-
getSizingsPostflop
Calculates the bet or raise sizings for a Postflop decision. Raise amounts are specified as raise-to.Negative amounts will be discarded by the tree builder. All other amounts will be adjusted to satisfy the minimum legal sizing and to be no larger than a bet or raise for effective stacks.
- Parameters:
ctx
- game state for the current decision point- Returns:
- Array of zero or more sizings in 1/100th of chips
-
canFlatCallPreflop
Tests whether the current player is allowed to limp or flat call Preflop.- Parameters:
ctx
- game state for the current decision point- Returns:
- true if the current player is allowed to flat call
-
hasNextStreetBetting
Tests whether betting can take place on the following streets. If false is returned then the hand will be checked down to showdown.- Parameters:
ctx
- game state for the current decision point- Returns:
- true if action continues on the next street, false for a forced check-down
-