|
||||||||||
| 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 bet| Method Detail |
|---|
public void play(BlackjackPack pack)
play in class BlackjackAbstractPlayerpack - of cards to play with(au.edu.mq.itec802.cardGame.blackjack.BlackjackPack)public int getAmount()
getAmount in class BlackjackAbstractPlayerpublic void setAmount(int amount)
amount - the amount to setpublic int getInitAmount()
getInitAmount in class BlackjackAbstractPlayer()public int getNumber()
getNumber in class BlackjackAbstractPlayerBlackjackAbstractPlayer.getNumber()public void play(Pack pack)
play in interface Playerpack - -- a pack to play with(au.edu.mq.itec802.cardGame.blackjack.BlackjackPack)public void wins(int bet)
wins in class BlackjackAbstractPlayerbet - the bet this player has won on another playerBlackjackAbstractPlayer.wins(int)public void loses()
loses in class BlackjackAbstractPlayerBlackjackAbstractPlayer.loses()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||