|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectau.edu.mq.itec802.cardGame.blackjack.BlackjackAbstractPlayer
au.edu.mq.itec802.cardGame.blackjack.BlackjackPlayer
public class BlackjackPlayer
The Class BlackjackPlayer.
Constructor Summary | |
---|---|
BlackjackPlayer(int number,
int amount,
int bet)
Instantiates a new blackjack player. |
Method Summary | |
---|---|
int |
getAmount()
Gets the actual amount. |
int |
getInitAmount()
Gets the initial amount |
int |
getNumber()
Gets the player's number |
void |
loses()
Simulates the player losing a round |
void |
play(BlackjackPack pack)
Play -- simulates the playing player |
void |
play(Pack pack)
Simulates the playing player |
void |
setAmount(int amount)
Sets the amount. |
void |
wins(int bet)
Simulates the player winning a round |
Methods inherited from class au.edu.mq.itec802.cardGame.blackjack.BlackjackAbstractPlayer |
---|
emptyHand, getBet, getScore, isHouse, setBet |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlackjackPlayer(int number, int amount, int bet)
number
- the player's numberamount
- the initial amountbet
- the betMethod Detail |
---|
public void play(BlackjackPack pack)
play
in class BlackjackAbstractPlayer
pack
- of cards to play with(au.edu.mq.itec802.cardGame.blackjack.BlackjackPack)
public int getAmount()
getAmount
in class BlackjackAbstractPlayer
public void setAmount(int amount)
amount
- the amount to setpublic int getInitAmount()
getInitAmount
in class BlackjackAbstractPlayer
()
public int getNumber()
getNumber
in class BlackjackAbstractPlayer
BlackjackAbstractPlayer.getNumber()
public void play(Pack pack)
play
in interface Player
pack
- -- a pack to play with(au.edu.mq.itec802.cardGame.blackjack.BlackjackPack)
public void wins(int bet)
wins
in class BlackjackAbstractPlayer
bet
- the bet this player has won on another playerBlackjackAbstractPlayer.wins(int)
public void loses()
loses
in class BlackjackAbstractPlayer
BlackjackAbstractPlayer.loses()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |