|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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 |
---|
Action getAction()
void actionEvent(int pos, Action action)
pos
- (int) the position of the player who made the actionaction
- (Action) the action made
This should be called when any one makes an actionvoid dealHoleCardsEvent()
void gameOverEvent()
void gameStartEvent(GameInfo arg0, int seat)
arg0
- (GameInfo) all the public information of the starting hand
(i.e. our GameModel object)
Called at the start of hand.void gameStateChanged()
void showdownEvent(int arg0, Card arg1, Card arg2)
arg0
- the showing playerarg1
- first cardarg2
- second shown cardvoid stageEvent(int stage)
stage
- void winEvent(int seat, double amount, Hand hand)
seat
- the playeramount
- the amount wonvoid receiveHand(Hand hand, int seat)
hand
- seat
- your seat in this round
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |