Models a deck of playing cards in a solitaire game.
| Field Summary | |
(package
private) int |
Current the current position in the deck |
(package
private) Card[] |
TheDeck Implementation of the deck is an array of cards |
| Constructor Summary | |
Deck()
Construct a deck of randomly shuffled cards |
|
| Method Summary | |
Card |
Deal()
Deal a card from the deck |
java.lang.String |
Get() Show cards remaining in deck |
boolean |
Is_Empty()
Are there any more cards to be dealt? |
void |
Shuffle()
Randomly rearrange the items in a one dimensional array USES: Math.Random() |
int |
SizeOf()
gets the size of the current deck |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify,
notifyAll, toString, wait, wait, wait |
| Field Detail |
Card[] TheDeck
int Current
| Constructor Detail |
public Deck()
| Method Detail |
public Card Deal()
public boolean Is_Empty()
public int SizeOf()
public java.lang.String Get()
public void Shuffle()