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

java.lang.Object
  extended by au.edu.mq.itec802.cardGame.blackjack.BlackjackPack
All Implemented Interfaces:
Pack

public class BlackjackPack
extends java.lang.Object
implements Pack

The Class BlackjackPack -- models a pack of cards for Blackjack.

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

Constructor Summary
BlackjackPack()
          Instantiates a new blackjack pack.
 
Method Summary
 Card getCard()
          Get the top-most card from the pack
 void shuffle(int alot)
          Shuffles the pack
 java.lang.String toString()
          Serializes the pack into string
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlackjackPack

public BlackjackPack()
Instantiates a new blackjack pack. Note: aces are treated separately -- they should, in fact, be modeled +as a subclass of Card

Method Detail

shuffle

public void shuffle(int alot)
Shuffles the pack

Specified by:
shuffle in interface Pack
Parameters:
alot - -- determines how thouroughly the pack should be shuffled
See Also:
Pack.shuffle(int)

getCard

public Card getCard()
Get the top-most card from the pack

Specified by:
getCard in interface Pack
Returns:
the card
See Also:
Pack.getCard()

toString

public java.lang.String toString()
Serializes the pack into string

Overrides:
toString in class java.lang.Object
Returns:
String representation of the pack