|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.classes.games.card.Card
Typesafe enum representing the playing cards in a standard 52-card deck.
Fields inherited from interface wyvern.lib.classes.games.card.CardConstants |
ACE, CLUBS, DIAMONDS, EIGHT, FIVE, FLUSH, FOUR, FOUR_OF_A_KIND, FULL_HOUSE, HEARTS, JACK, KING, NINE, NOTHING, NUM_FACES, NUM_SUITS, ONE_PAIR, QUEEN, ROYAL_FLUSH, SEVEN, SIX, SPADES, STRAIGHT, STRAIGHT_FLUSH, TEN, THREE, THREE_OF_A_KIND, TWO, TWO_PAIR |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Returns true if the cards are equal (same face and suit). |
static Card[] |
getAllCards()
Returns a newly-instantiated array of all 52 cards, unshuffled. |
static Card |
getCard(Face face,
Suit suit)
Returns the Card with the specified Face and Suit. |
Face |
getFace()
Returns the Face. |
int |
getFaceNumber()
Returns the face number (1-13) |
int |
getFaceValue()
Returns card face value (1-10) |
java.lang.String |
getName()
Returns the name of this Card. |
Suit |
getSuit()
Returns the Suit. |
int |
getSuitNumber()
Returns the suit number (0-3) |
int |
hashCode()
Returns a hashcode for the card. |
static void |
main(java.lang.String[] args)
Misc testing functions. |
java.lang.String |
toString()
Returns the name of the card. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NUM_CARDS
public static final Card ACE_OF_HEARTS
public static final Card ACE_OF_DIAMONDS
public static final Card ACE_OF_CLUBS
public static final Card ACE_OF_SPADES
public static final Card TWO_OF_HEARTS
public static final Card TWO_OF_DIAMONDS
public static final Card TWO_OF_CLUBS
public static final Card TWO_OF_SPADES
public static final Card THREE_OF_HEARTS
public static final Card THREE_OF_DIAMONDS
public static final Card THREE_OF_CLUBS
public static final Card THREE_OF_SPADES
public static final Card FOUR_OF_HEARTS
public static final Card FOUR_OF_DIAMONDS
public static final Card FOUR_OF_CLUBS
public static final Card FOUR_OF_SPADES
public static final Card FIVE_OF_HEARTS
public static final Card FIVE_OF_DIAMONDS
public static final Card FIVE_OF_CLUBS
public static final Card FIVE_OF_SPADES
public static final Card SIX_OF_HEARTS
public static final Card SIX_OF_DIAMONDS
public static final Card SIX_OF_CLUBS
public static final Card SIX_OF_SPADES
public static final Card SEVEN_OF_HEARTS
public static final Card SEVEN_OF_DIAMONDS
public static final Card SEVEN_OF_CLUBS
public static final Card SEVEN_OF_SPADES
public static final Card EIGHT_OF_HEARTS
public static final Card EIGHT_OF_DIAMONDS
public static final Card EIGHT_OF_CLUBS
public static final Card EIGHT_OF_SPADES
public static final Card NINE_OF_HEARTS
public static final Card NINE_OF_DIAMONDS
public static final Card NINE_OF_CLUBS
public static final Card NINE_OF_SPADES
public static final Card TEN_OF_HEARTS
public static final Card TEN_OF_DIAMONDS
public static final Card TEN_OF_CLUBS
public static final Card TEN_OF_SPADES
public static final Card JACK_OF_HEARTS
public static final Card JACK_OF_DIAMONDS
public static final Card JACK_OF_CLUBS
public static final Card JACK_OF_SPADES
public static final Card QUEEN_OF_HEARTS
public static final Card QUEEN_OF_DIAMONDS
public static final Card QUEEN_OF_CLUBS
public static final Card QUEEN_OF_SPADES
public static final Card KING_OF_HEARTS
public static final Card KING_OF_DIAMONDS
public static final Card KING_OF_CLUBS
public static final Card KING_OF_SPADES
Method Detail |
public java.lang.String getName()
public java.lang.String toString()
public Face getFace()
public Suit getSuit()
public int getFaceNumber()
public int getFaceValue()
public int getSuitNumber()
public static Card getCard(Face face, Suit suit)
public static Card[] getAllCards()
public boolean equals(java.lang.Object obj)
obj
- the object to compare to
public int hashCode()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |