au.edu.mq.itec802.cardGame.blackjack
Class BlackjackPlayer

java.lang.Object
  extended by au.edu.mq.itec802.cardGame.blackjack.BlackjackAbstractPlayer
      extended by au.edu.mq.itec802.cardGame.blackjack.BlackjackPlayer
All Implemented Interfaces:
Player

public class BlackjackPlayer
extends BlackjackAbstractPlayer
implements Player

The Class BlackjackPlayer.

Version:
$Id: BlackjackPlayer.java 22/03/2011 jumbo$
Author:
Tomas Krajca

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

BlackjackPlayer

public BlackjackPlayer(int number,
                       int amount,
                       int bet)
Instantiates a new blackjack player.

Parameters:
number - the player's number
amount - the initial amount
bet - the bet
Method Detail

play

public void play(BlackjackPack pack)
Play -- simulates the playing player

Specified by:
play in class BlackjackAbstractPlayer
Parameters:
pack - of cards to play with
See Also:
(au.edu.mq.itec802.cardGame.blackjack.BlackjackPack)

getAmount

public int getAmount()
Gets the actual amount.

Specified by:
getAmount in class BlackjackAbstractPlayer
Returns:
the actual amount

setAmount

public void setAmount(int amount)
Sets the amount.

Parameters:
amount - the amount to set

getInitAmount

public int getInitAmount()
Gets the initial amount

Specified by:
getInitAmount in class BlackjackAbstractPlayer
Returns:
the player's initial amount
See Also:
()

getNumber

public int getNumber()
Gets the player's number

Specified by:
getNumber in class BlackjackAbstractPlayer
Returns:
the player's number
See Also:
BlackjackAbstractPlayer.getNumber()

play

public void play(Pack pack)
Simulates the playing player

Specified by:
play in interface Player
Parameters:
pack - -- a pack to play with
See Also:
(au.edu.mq.itec802.cardGame.blackjack.BlackjackPack)

wins

public void wins(int bet)
Simulates the player winning a round

Overrides:
wins in class BlackjackAbstractPlayer
Parameters:
bet - the bet this player has won on another player
See Also:
BlackjackAbstractPlayer.wins(int)

loses

public void loses()
Simulates the player losing a round

Overrides:
loses in class BlackjackAbstractPlayer
See Also:
BlackjackAbstractPlayer.loses()