All Packages Class Hierarchy This Package Previous Next Index
Class com.lotspiech.poker.Card
java.lang.Object
|
+----com.lotspiech.poker.Card
- public class Card
- extends Object
- implements Serializable
This class represents a single card.
Copyright 2001, 2002 by Jeffrey B. Lotspiech. This program is open source;
it is licensed under the Common Public License Version 0.5.
- Author:
- Jeffrey B. Lotspiech
-
ACE
-
-
cardRank
-
-
cardSuit
-
-
CLUB
-
-
COPYRIGHT
-
-
DIAMOND
-
-
EIGHT
-
-
FIVE
-
-
FOUR
-
-
HEART
-
-
JACK
-
-
JOKER
-
-
KING
-
-
NINE
-
-
NO_WILD_RANK
- The idea is that a wild rank, (e.g., deuces wild), is implemented
by moving the ranks from the original index to the "WILD_RANK" index.
-
QUEEN
-
-
RANK_STRING
-
-
SEVEN
-
-
SIX
-
-
SPADE
-
-
SUIT_STRING
-
-
TEN
-
-
THREE
-
-
TWO
-
-
wild
-
-
WILD_RANK
-
-
Card(int)
-
-
Card(int, int)
-
-
Card(String)
-
-
equals(Card)
-
-
isWild()
- Is this card wild? This question can only be asked in the
context of a given Machine.
-
rank()
-
-
setWild()
- Sets a card "wild" in a given situation.
-
suit()
-
-
toString()
-
COPYRIGHT
private static final String COPYRIGHT
JOKER
public static final int JOKER
ACE
public static final int ACE
KING
public static final int KING
QUEEN
public static final int QUEEN
JACK
public static final int JACK
TEN
public static final int TEN
NINE
public static final int NINE
EIGHT
public static final int EIGHT
SEVEN
public static final int SEVEN
SIX
public static final int SIX
FIVE
public static final int FIVE
FOUR
public static final int FOUR
THREE
public static final int THREE
TWO
public static final int TWO
NO_WILD_RANK
public static final int NO_WILD_RANK
- The idea is that a wild rank, (e.g., deuces wild), is implemented
by moving the ranks from the original index to the "WILD_RANK" index.
WILD_RANK
public static final int WILD_RANK
RANK_STRING
public static final String RANK_STRING
SPADE
public static final int SPADE
HEART
public static final int HEART
DIAMOND
public static final int DIAMOND
CLUB
public static final int CLUB
SUIT_STRING
public static final String SUIT_STRING
cardRank
private int cardRank
cardSuit
private int cardSuit
wild
boolean wild
Card
public Card(int i)
Card
public Card(int cardSuit,
int cardRank)
- Parameters:
- cardSuit - Card.SPADE, Card.HEART, etc.
- cardRank - Card.ACE, Card.NINE, etc.
Card
public Card(String name) throws Exception
equals
public boolean equals(Card c)
isWild
public boolean isWild()
- Is this card wild? This question can only be asked in the
context of a given Machine. The card will have to have been
"setWild()" by Machine.makeHand(), for example.
- Returns:
- true if wild.
rank
public int rank()
setWild
public void setWild()
- Sets a card "wild" in a given situation.
suit
public int suit()
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index