|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Player
An interface for a poker player.
Method Summary | |
---|---|
int |
action()
Requests an action from the player (FOLD, CALL, RAISE) RAISE_NL(amount) in a no-limit game as a special case. |
void |
actionEvent(int pos,
int action,
int amount)
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 |
init(Preferences prefs)
Initialize your player from the given preferences file. |
void |
newGame(GameInfo gInfo,
Card c1,
Card c2,
int ID)
Start playing a new game. |
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,
int amount,
java.lang.String handName)
A player at pos has won amount with the hand handName |
Method Detail |
---|
void init(Preferences prefs)
prefs
- some settings for the playervoid newGame(GameInfo gInfo, Card c1, Card c2, int ID)
gInfo
- the new game informationc1
- first hole cardc2
- second hole cardID
- your player ID for this game (position from the button)void actionEvent(int pos, int action, int amount)
actionEvent
in interface GameObserver
pos
- the player's positionaction
- the action made by the playeramount
- an amount (called, raised, etc...) or 0 if not applicablevoid stageEvent(int stage)
stageEvent
in interface GameObserver
stage
- the new stage IDvoid showdownEvent(int pos, Card c1, Card c2)
showdownEvent
in interface GameObserver
pos
- the palyer showing cardsc1
- the player's first hole cardc2
- the player's second hole cardvoid gameStartEvent(GameInfo gi)
gameStartEvent
in interface GameObserver
void gameOverEvent()
gameOverEvent
in interface GameObserver
void winEvent(int pos, int amount, java.lang.String handName)
winEvent
in interface GameObserver
int action()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |