com.asdf.plugins.pokergames.texasholdem.bots
Class Bananabot

java.lang.Object
  extended by com.asdf.plugins.pokergames.texasholdem.bots.Bananabot
All Implemented Interfaces:
Player

public class Bananabot
extends java.lang.Object
implements Player

Simple rule-based bot to show the capabilities of the AI-interface.

Author:
teemu

Constructor Summary
Bananabot()
           
 
Method Summary
 void actionEvent(int pos, Action act)
          An action has been observed.
 void dealHoleCardsEvent()
          An event sent when all players are being dealt their hole cards
 void gameOverEvent()
          The hand is now over.
 void gameStartEvent(GameInfo gInfo, int seat)
          A new game has been started.
 void gameStateChanged()
          The game info state has been updated Called after an action event has been fully processed
 Action getAction()
          Requests an Action from the player Called when it is the Player's turn to act.
 void receiveHand(Hand hand, int seat)
          Receive your hand, and your seat, this is called when the player is dealt his hand
 void showdownEvent(int seat, Card c1, Card c2)
          A showdown has occurred.
 void stageEvent(int stage)
          A new betting round has started.
 void winEvent(int seat, double amount, Hand hand)
          A player at seat has won amount with the hand
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bananabot

public Bananabot()
Method Detail

getAction

public Action getAction()
Requests an Action from the player Called when it is the Player's turn to act.

Specified by:
getAction in interface Player
Returns:
Action the players next action, with desired amount This is called when it is the players turn to act.

stageEvent

public void stageEvent(int stage)
A new betting round has started.

Specified by:
stageEvent in interface Player

showdownEvent

public void showdownEvent(int seat,
                          Card c1,
                          Card c2)
A showdown has occurred.

Specified by:
showdownEvent in interface Player
Parameters:
seat - of the player showing
c1 - the first hole card shown
c2 - the second hole card shown

gameStartEvent

public void gameStartEvent(GameInfo gInfo,
                           int seat)
A new game has been started.

Specified by:
gameStartEvent in interface Player
Parameters:
gInfo - the game information

dealHoleCardsEvent

public void dealHoleCardsEvent()
An event sent when all players are being dealt their hole cards

Specified by:
dealHoleCardsEvent in interface Player

actionEvent

public void actionEvent(int pos,
                        Action act)
An action has been observed.

Specified by:
actionEvent in interface Player
Parameters:
pos - (int) the position of the player who made the action
act - (Action) the action made This should be called when any one makes an action

gameStateChanged

public void gameStateChanged()
The game info state has been updated Called after an action event has been fully processed

Specified by:
gameStateChanged in interface Player

gameOverEvent

public void gameOverEvent()
The hand is now over.

Specified by:
gameOverEvent in interface Player

winEvent

public void winEvent(int seat,
                     double amount,
                     Hand hand)
A player at seat has won amount with the hand

Specified by:
winEvent in interface Player
Parameters:
seat - the player
amount - the amount won

receiveHand

public void receiveHand(Hand hand,
                        int seat)
Description copied from interface: Player
Receive your hand, and your seat, this is called when the player is dealt his hand

Specified by:
receiveHand in interface Player
seat - your seat in this round