wyvern.lib.classes.games.card
Class Face

java.lang.Object
  extended bywyvern.lib.classes.games.card.Face

public final class Face
extends java.lang.Object

Typesafe enum representing card faces in a standard deck of playing cards.

Version:
1.0, Oct 02, 2003
Author:
Steve Yegge

Field Summary
static Face ACE
           
static Face EIGHT
           
static Face FIVE
           
static Face FOUR
           
static Face JACK
           
static Face KING
           
static Face NINE
           
static int NUM_FACES
           
static Face QUEEN
           
static Face SEVEN
           
static Face SIX
           
static Face TEN
           
static Face THREE
           
static Face TWO
           
 
Method Summary
 int getFaceNumber()
          Returns the face number (1-13).
 int getFaceValue()
          Returns the face-value of the card.
 java.lang.String getName()
          Returns "Ace", "Two" through "Ten", or "Jack" through "King"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACE

public static final Face ACE

TWO

public static final Face TWO

THREE

public static final Face THREE

FOUR

public static final Face FOUR

FIVE

public static final Face FIVE

SIX

public static final Face SIX

SEVEN

public static final Face SEVEN

EIGHT

public static final Face EIGHT

NINE

public static final Face NINE

TEN

public static final Face TEN

JACK

public static final Face JACK

QUEEN

public static final Face QUEEN

KING

public static final Face KING

NUM_FACES

public static final int NUM_FACES
See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
Returns "Ace", "Two" through "Ten", or "Jack" through "King"


getFaceNumber

public int getFaceNumber()
Returns the face number (1-13).

Returns:
Ace=1, Two=2, ..., Ten=10, Jack=11, Queen=12, King=13

getFaceValue

public int getFaceValue()
Returns the face-value of the card.

Returns:
the face, or 10 for face-cards (Jack/King/Queen)