public class Deck extends CardStack
| Constructor and Description |
|---|
Deck(long seed)
Create a shuffled deck of cards according to the given random number seed.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPlayFrom()
Throws IllegalPlayException "That card stack cannot be played from."
|
boolean |
playTo(Card card)
Throws IllegalPlayException "Illegal stack number.
|
addCard, getTopCard, isEmpty, playTo, removeTopCard, size, toArray, toStringpublic Deck(long seed)
seed - random seed for deck shufflepublic boolean canPlayFrom()
throws IllegalPlayException
canPlayFrom in class CardStackIllegalPlayException - "That card stack cannot be played from."public boolean playTo(Card card) throws java.lang.NullPointerException, IllegalPlayException
playTo in class CardStackcard - card to be played onto this card stackjava.lang.NullPointerException - thrown if given Card parameter is nullIllegalPlayException - "Illegal stack number. Stacks are numbered 1-16."