|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.amoebacode.blackjack.core.Card
Card represents a single playing card, tracking its value, suit, and score.
| Field Summary | |
private int |
score
The score of the card (2, 3, 4, 5, 6, 7, 8, 9, 10, or 11) |
private char |
suit
The suit of the card (C, D, H, or S) |
private char |
value
The value of the card (2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, or A) |
| Constructor Summary | |
protected |
Card(char value,
char suit,
int score)
Default protected constructor. |
| Method Summary | |
protected int |
getHardScore()
Returns the hard score of this card. |
protected int |
getScore()
Returns the soft score of this card. |
char |
getSuit()
Returns the suit of this card (C, D, H, or S). |
char |
getValue()
Returns the value of this card (2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, K, or A). |
protected boolean |
isAce()
Indicates whether this card is an ace. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private char value
private char suit
private int score
| Constructor Detail |
protected Card(char value,
char suit,
int score)
value - the value of the cardsuit - the suit of the cardscore - the score of the card| Method Detail |
protected int getScore()
protected int getHardScore()
protected boolean isAce()
public char getValue()
ICardgetValue in interface ICardICard.getValue()public char getSuit()
ICardgetSuit in interface ICardICard.getSuit()
|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||