poker
Interface GameObserver

All Known Subinterfaces:
Player

public interface GameObserver

An interface for a poker game observer. All public game events are sent to a game observer, so that the game may be tracked.

Author:
Aaron Davidson

Method Summary
 void actionEvent(int pos, Action act)
          A player can override this method to recieve events for each action made by a player.
 void gameOverEvent()
          The hand is now over.
 void gameStartEvent(GameInfo gi)
          The hand is starting
 void gameStateChanged()
          The game info state has been updated Called after an action event has been fully processed
 void showdownEvent(int pos, Card c1, Card c2)
          Player pos has shown two cards.
 void stageEvent(int stage)
          A new stage (betting round) has begun.
 void winEvent(int pos, double amount, java.lang.String handName)
          A player at pos has won amount with the hand handName
 

Method Detail

actionEvent

void actionEvent(int pos,
                 Action act)
A player can override this method to recieve events for each action made by a player.

Parameters:
pos - the player's position
action - the action made by the player

stageEvent

void stageEvent(int stage)
A new stage (betting round) has begun. A player may override this method to recieve the event The stage is a constant such as Holdem.PREFLOP, Holdem.FLOP, etc...

Parameters:
stage - the new stage ID (@see Holdem)

showdownEvent

void showdownEvent(int pos,
                   Card c1,
                   Card c2)
Player pos has shown two cards.

Parameters:
pos - the palyer showing cards
c1 - the player's first hole card
c2 - the player's second hole card

gameStartEvent

void gameStartEvent(GameInfo gi)
The hand is starting


gameOverEvent

void gameOverEvent()
The hand is now over.


winEvent

void winEvent(int pos,
              double amount,
              java.lang.String handName)
A player at pos has won amount with the hand handName


gameStateChanged

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