wyvern.lib.classes.games.card
Class Suit
java.lang.Object
wyvern.lib.classes.games.card.Suit
- public final class Suit
- extends java.lang.Object
Typesafe enum for the four Suits in a standard deck of playing cards.
- Version:
- 1.0, Oct 02, 2003
- Author:
- Steve Yegge
Method Summary |
java.lang.String |
getName()
Returns "Hearts", "Clubs", "Spades", or "Diamonds". |
int |
getSuitNumber()
Returns the number of the suit, for deck indexing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HEARTS
public static final Suit HEARTS
DIAMONDS
public static final Suit DIAMONDS
CLUBS
public static final Suit CLUBS
SPADES
public static final Suit SPADES
NUM_SUITS
public static final int NUM_SUITS
- See Also:
- Constant Field Values
getName
public java.lang.String getName()
- Returns "Hearts", "Clubs", "Spades", or "Diamonds".
getSuitNumber
public int getSuitNumber()
- Returns the number of the suit, for deck indexing.
- Returns:
- HEARTS = 0, DIAMONDS = 1, CLUBS = 2, SPADES = 3