Java Documentation


For Python documentation

This is the the stripped down version of the full documentation that will help you get started with your first Poker Bot Battle script. If you want the full overview of the documentation you can follow this link. Keep in mind that the full documentation is for Python.

Getting Started

Basics

Your program can return the following options:

If your program raises an exception it will be the equivalent to returning 0.

Get current cards

This will put the bots current hand type, with the table taken into account, into a variable called currentBotHand:

HandType currentBotHand = obs.getMyHandType();

This will put the boards hand type, with the bots hand excluded:

HandType currentBoardHand = obs.getBoardHandType()

Both variables will be of type HandType (enum), which looks like this:

If you want to match the current handtype to a specific hand type, you can do it like this:

if (currentBotHand == HandType.STRAIGHTFLUSH) {
    someAction();
}

Or you can check if the current hand is better than a specific handtype:


if (currentBotHand.getValue() >= HandType.PAIR.getValue()) {
    someAction();
}

If you want to match your hand to a specific range, you can do it like this:


if (new Range("77+, A8s+, K9s+, QTs+, AJo+, KQo").isHandInRange(obs.getMyHand())) {
    someAction();
}

The list above is a list of hands that are generated with the help of the site below:

When you have created the wanted hand range you can copy the range string into your script.


Get current round

If you want to base some action on the specific round of the current game, you can do it like this:


if (obs.getCurrentRound() == 2) {
    someAction();
}

The current round is an int and can be interpreted like this:

Testing your bot


If you have any questions just ask us at the event.
Good luck with your bot and have fun!