|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectcardDeck.CardPile
cardDeck.DeckOfCards
public class DeckOfCards
The deck of cards to be used for a game.
| Constructor Summary | |
|---|---|
DeckOfCards(int useXJokers)
Constructor |
|
| Method Summary | |
|---|---|
Card |
deal()
Deals out one card |
java.util.ArrayList<Card> |
deal(int n)
Deals out the appropriate number of cards. |
void |
newRound()
Shuffle all cards into the deck Pre: All cards have been discarded as this will create a whole new deck, so if hands, discard piles, etc exist clear them first to insure no duplicates. |
boolean |
rulesAllowAddingThisCard(Card card)
Subclasses may override this to enforce their rules for adding cards to the pile. |
| Methods inherited from class cardDeck.CardPile |
|---|
clear, isRemovable, iterator, peekTop, pop, popIgnoreRules, push, pushIgnoreRules, reverseIterator, shuffle, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeckOfCards(int useXJokers)
useXJokers - Number of jokers to use in this deck| Method Detail |
|---|
public void newRound()
public boolean rulesAllowAddingThisCard(Card card)
rulesAllowAddingThisCard in class CardPilecard - Card to be added.
public Card deal()
public java.util.ArrayList<Card> deal(int n)
n - Number of cards to deal out
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||