org.jscience.computing.game.cards
Class CardDeck

java.lang.Object
  extended by org.jscience.computing.game.cards.CardDeck
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class CardDeck
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

represents a stack of cards

See Also:
Serialized Form

Constructor Summary
CardDeck(int numberOfDecks, boolean bigDeck, boolean shuffled)
          Creates a new CardDeck object.
 
Method Summary
 void addCard(Card c)
          DOCUMENT ME!
 void addDeck(CardDeck deck)
          DOCUMENT ME!
 int cardsLeft()
          DOCUMENT ME!
 java.lang.Object clone()
          DOCUMENT ME!
 void shuffle()
          DOCUMENT ME!
 void shuffle(java.util.Random rnd)
          DOCUMENT ME!
 Card takeCard()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CardDeck

public CardDeck(int numberOfDecks,
                boolean bigDeck,
                boolean shuffled)
Creates a new CardDeck object.

Parameters:
numberOfDecks - DOCUMENT ME!
bigDeck - DOCUMENT ME!
shuffled - DOCUMENT ME!
Method Detail

takeCard

public Card takeCard()
DOCUMENT ME!

Returns:
DOCUMENT ME!

cardsLeft

public int cardsLeft()
DOCUMENT ME!

Returns:
DOCUMENT ME!

shuffle

public void shuffle()
DOCUMENT ME!


shuffle

public void shuffle(java.util.Random rnd)
DOCUMENT ME!

Parameters:
rnd - DOCUMENT ME!

addCard

public void addCard(Card c)
DOCUMENT ME!

Parameters:
c - DOCUMENT ME!

addDeck

public void addDeck(CardDeck deck)
DOCUMENT ME!

Parameters:
deck - DOCUMENT ME!

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
DOCUMENT ME!

Overrides:
clone in class java.lang.Object
Returns:
DOCUMENT ME!
Throws:
java.lang.CloneNotSupportedException - DOCUMENT ME!