com.asdf.plugins.pokergames
Class Deck

java.lang.Object
  extended by com.asdf.plugins.pokergames.Deck

public class Deck
extends java.lang.Object

Represents a traditional 52 card deck with no jokers.

Author:
urtela

Field Summary
static int[] primes
           
 
Constructor Summary
Deck()
          Default constructor.
 
Method Summary
 Card dealCard()
          Removes the bottom card from the deck.
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

primes

public static int[] primes
Constructor Detail

Deck

public Deck()
Default constructor. Initialises the deck into a randomised 52 card deck. No jokers.

Method Detail

newDeck

public void newDeck()
Initialises this deck into a randomised 52 card deck. No jokers. Removes any possible information the deck might previously contain.


shuffle

public void shuffle()
Shuffles the deck.


dealCard

public Card dealCard()
Removes the bottom card from the deck.

Returns:
The bottom card of the deck.

toString

public java.lang.String toString()
Gives a string representation of the deck.

Overrides:
toString in class java.lang.Object