|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.asdf.plugins.pokergames.OurPlayer
public class OurPlayer
class implementing Player interface for human players to send action choices through
Constructor Summary | |
---|---|
OurPlayer(java.lang.String name,
int mySeat,
PokerGameController gameController)
|
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()
|
GameController |
getGameController()
|
Hand |
getHand()
|
static void |
main(java.lang.String[] args)
|
void |
receiveHand(Hand hand,
int seat)
Receive your hand, and your seat, this is called when the player is dealt his hand |
void |
setGameController(PokerGameController gameController)
|
void |
showdownEvent(int pos,
Card c1,
Card c2)
from GameObserver, Player pos has shown two cards. |
void |
stageEvent(int arg0)
a new stage has begun. |
void |
winEvent(int seat,
double amount,
Hand hand)
from GameObserver, a player at seat has won amount |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OurPlayer(java.lang.String name, int mySeat, PokerGameController gameController)
Method Detail |
---|
public void setGameController(PokerGameController gameController)
public GameController getGameController()
public Hand getHand()
public void actionEvent(int pos, Action action)
actionEvent
in interface Player
pos
- (int) the position of the player who made the actionaction
- (Action) the action made
This should be called when any one makes an actionpublic void dealHoleCardsEvent()
Player
dealHoleCardsEvent
in interface Player
public void gameOverEvent()
Player
gameOverEvent
in interface Player
public void gameStartEvent(GameInfo arg0, int seat)
gameStartEvent
in interface Player
arg0
- (GameInfo) all the public information of the starting hand
(i.e. our GameModel object)
Called at the start of hand.public void gameStateChanged()
Player
gameStateChanged
in interface Player
public Action getAction()
getAction
in interface Player
public void receiveHand(Hand hand, int seat)
Player
receiveHand
in interface Player
seat
- your seat in this roundpublic void showdownEvent(int pos, Card c1, Card c2)
Player
showdownEvent
in interface Player
pos
- the showing playerc1
- first cardc2
- second shown cardpublic void stageEvent(int arg0)
Player
stageEvent
in interface Player
public void winEvent(int seat, double amount, Hand hand)
Player
winEvent
in interface Player
seat
- the playeramount
- the amount wonpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |