|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.asdf.plugins.pokergames.Deck
public class Deck
Represents a traditional 52 card deck with no jokers.
| Field Summary | |
|---|---|
static int |
NUM_CARDS
|
static int[] |
primes
|
| Constructor Summary | |
|---|---|
Deck()
Default constructor. |
|
| Method Summary | |
|---|---|
Card |
dealCard()
Removes the bottom card from the deck. |
void |
extractCard(Card c)
Extracts known card from the deck. |
void |
extractHand(Hand h)
Extracts known cards from the deck. |
Card |
getCard(int index)
Gets the card in the given index. |
int |
getNumberOfCards()
Getter method of the size |
void |
newDeck()
Initialises this deck into a randomised 52 card deck. |
void |
shuffle()
Shuffles the deck. |
java.lang.String |
toString()
Gives a string representation of the deck. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int[] primes
public static final int NUM_CARDS
| Constructor Detail |
|---|
public Deck()
| Method Detail |
|---|
public void newDeck()
public void shuffle()
public Card dealCard()
public void extractCard(Card c)
public void extractHand(Hand h)
public Card getCard(int index)
index -
public int getNumberOfCards()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||