com.asdf.plugins.pokergames
Interface Player

All Known Implementing Classes:
Bananabot, KillerBot, OurPlayer, SuperBot

public interface Player

Interface for players and bots to implement for receiving updates and to be asked for actions. Method gameStartEvent is called at the beginning of hand, and it includes all the public info of the hand in progress and seat for the player. The bot also reaches the public information as kept by the server through the info.

Author:
rimpila

Method Summary
 void actionEvent(int pos, Action action)
           
 void dealHoleCardsEvent()
          From GameObserver, called when hole cards are dealt.
 void gameOverEvent()
          Called when the hand is over.
 void gameStartEvent(GameInfo arg0, int seat)
           
 void gameStateChanged()
          From GameObserver, called whenever an action is completed, and the GameModel has been updated
 Action getAction()
           
 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 arg0, Card arg1, Card arg2)
          from GameObserver, Player pos has shown two cards.
 void stageEvent(int stage)
          a new stage has begun.
 void winEvent(int seat, double amount, Hand hand)
          from GameObserver, a player at seat has won amount
 

Method Detail

getAction

Action getAction()
Returns:
Action the players next action, with desired amount This is called when it is the players turn to act.

actionEvent

void actionEvent(int pos,
                 Action action)
Parameters:
pos - (int) the position of the player who made the action
action - (Action) the action made This should be called when any one makes an action

dealHoleCardsEvent

void dealHoleCardsEvent()
From GameObserver, called when hole cards are dealt.


gameOverEvent

void gameOverEvent()
Called when the hand is over.


gameStartEvent

void gameStartEvent(GameInfo arg0,
                    int seat)
Parameters:
arg0 - (GameInfo) all the public information of the starting hand (i.e. our GameModel object) Called at the start of hand.

gameStateChanged

void gameStateChanged()
From GameObserver, called whenever an action is completed, and the GameModel has been updated


showdownEvent

void showdownEvent(int arg0,
                   Card arg1,
                   Card arg2)
from GameObserver, Player pos has shown two cards.

Parameters:
arg0 - the showing player
arg1 - first card
arg2 - second shown card

stageEvent

void stageEvent(int stage)
a new stage has begun. A player may override this method to receive the event for texas hold'em the stage is a constant from TexasHoldemEnumStage

Parameters:
stage -

winEvent

void winEvent(int seat,
              double amount,
              Hand hand)
from GameObserver, a player at seat has won amount

Parameters:
seat - the player
amount - the amount won

receiveHand

void receiveHand(Hand hand,
                 int seat)
Receive your hand, and your seat, this is called when the player is dealt his hand

Parameters:
hand -
seat - your seat in this round