|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpoker.Card
public class Card
An immutable class representing a playing card from a standard deck. Each card has a value and a suit.
Constructor Summary | |
---|---|
Card(int value,
int suit)
Standard constructor. |
Method Summary | |
---|---|
java.lang.String |
getImageFileName()
[STUDENTS SHOULD NOT BE CALLING THIS METHOD!] Used for finding the image corresponding to this Card. |
int |
getSuit()
"Getter" for suit of Card. |
int |
getValue()
"Getter" for value of Card. |
java.lang.String |
toString()
Returns the name of the card as a String. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Card(int value, int suit)
value
- 1 through 13; 1 represents Ace, 2 through 10 for numerical
cards, 11 is Jack, 12 is Queen, 13 is Kingsuit
- 0 through 3; represents Spades, Hearts, Clubs, or DiamondsMethod Detail |
---|
public int getValue()
public int getSuit()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getImageFileName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |