|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.game.cards.Card
public class Card
a representation of a game card
| Field Summary | |
|---|---|
static int |
ACE
DOCUMENT ME! |
static boolean |
BIG_DECK
DOCUMENT ME! |
static byte |
CLUBS
DOCUMENT ME! |
static byte |
DIAMONDS
DOCUMENT ME! |
static int |
EIGHT
DOCUMENT ME! |
static int |
FIVE
DOCUMENT ME! |
static int |
FOUR
DOCUMENT ME! |
static byte |
HEARTS
DOCUMENT ME! |
static int |
JACK
DOCUMENT ME! |
static int |
JOKER
DOCUMENT ME! |
static int |
KING
DOCUMENT ME! |
static int |
NINE
DOCUMENT ME! |
static int |
QUEEN
DOCUMENT ME! |
static int |
SEVEN
DOCUMENT ME! |
static int |
SIX
DOCUMENT ME! |
static boolean |
SMALL_DECK
DOCUMENT ME! |
static byte |
SPADES
DOCUMENT ME! |
static int |
TEN
DOCUMENT ME! |
static int |
THREE
DOCUMENT ME! |
static int |
TWO
DOCUMENT ME! |
| Constructor Summary | |
|---|---|
Card(int type)
to instanciate a Joker only; accepts only JOKER as type |
|
Card(int rank,
byte suit)
use static members of this class for parameters |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
DOCUMENT ME! |
int |
getRank()
DOCUMENT ME! |
byte |
getSuit()
DOCUMENT ME! |
boolean |
isInSmallDeck()
returns true only if the Card is one that belongs in a small deck (Ace, King, Queen, Jack, Ten, Nine, Eight, Seven) |
boolean |
sameRank(Card c)
DOCUMENT ME! |
boolean |
sameSuit(Card c)
DOCUMENT ME! |
java.lang.String |
toString()
DOCUMENT ME! |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final boolean BIG_DECK
public static final boolean SMALL_DECK
public static final byte CLUBS
public static final byte SPADES
public static final byte HEARTS
public static final byte DIAMONDS
public static final int ACE
public static final int KING
public static final int QUEEN
public static final int JACK
public static final int TEN
public static final int NINE
public static final int EIGHT
public static final int SEVEN
public static final int SIX
public static final int FIVE
public static final int FOUR
public static final int THREE
public static final int TWO
public static final int JOKER
| Constructor Detail |
|---|
public Card(int type)
throws java.lang.IllegalArgumentException
type - DOCUMENT ME!
java.lang.IllegalArgumentException - DOCUMENT ME!
public Card(int rank,
byte suit)
throws java.lang.IllegalArgumentException
rank - DOCUMENT ME!suit - DOCUMENT ME!
java.lang.IllegalArgumentException - DOCUMENT ME!| Method Detail |
|---|
public boolean isInSmallDeck()
public byte getSuit()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - DOCUMENT ME!
public boolean sameRank(Card c)
c - DOCUMENT ME!
public boolean sameSuit(Card c)
c - DOCUMENT ME!
public int getRank()
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 | ||||||||