|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gbayer.basicblackjack.Card
public class Card
A Card within a Deck
or a Hand
Field Summary | |
---|---|
static int |
ACE_ID
Constant - Card id representing an ace. |
static int |
FACE_CARD_VALUE
Constant - Value of any face card. |
static int |
FIRST_FACE_CARD_ID
Constant - All cards with ids equal or greater are face cards. |
static int |
HIGH_ACE_VALUE
Constant - High value of an ace. |
static int |
JACK_ID
Constant - Card id representing an jack. |
static int |
KING_ID
Constant - Card id representing an king. |
static int |
LOW_ACE_VALUE
Constant - Low value of an ace. |
static int |
MAX_CARD_ID
Constant - Number of unique card ids. |
static int |
QUEEN_ID
Constant - Card id representing an queen. |
Constructor Summary | |
---|---|
Card(int card)
Instantiates a new card. |
Method Summary | |
---|---|
int |
getCardValue(boolean acesLow)
Gets the card's value. |
java.lang.String |
toString()
Generates character representation of card. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FACE_CARD_VALUE
public static final int LOW_ACE_VALUE
public static final int HIGH_ACE_VALUE
public static final int ACE_ID
public static final int JACK_ID
public static final int QUEEN_ID
public static final int KING_ID
public static final int FIRST_FACE_CARD_ID
public static final int MAX_CARD_ID
Constructor Detail |
---|
public Card(int card)
card
- the cardMethod Detail |
---|
public int getCardValue(boolean acesLow)
acesLow
- indicates whether to treat an ace's as value 1 or 11)
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 |