|
|
|||||||||
|
||||||||||
|
java.lang.Object
Deck
public class Deck
extends java.lang.Object
An encapsulation of a (52-card) deck of "playing cards"
|
|
Method Summary |
|
|
|
|
|
|
|
Methods inherited from class java.lang.Object |
|
public Deck()
Default Constructor Note: When a
Deck is constructed it is not shuffled
public boolean hasMoreCards()
Determine if this Deck has any
cards that have not yet been dealt
Returns:
true if
another Card can be dealt, false otherwise
public Card nextCard()
Get the next Card in this Deck (if
one is available)
Returns:
The next Card (or null if no Card
is available)
public void shuffle()
Shuffle this Deck of cards (using
the Fisher-Yates algorithm)
|
|
|||||||||
|
||||||||||
|