|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.classes.games.card.HandType
Represents the "good" hands you can get: 2 pair, 3 of a kind, full house, etc. Typesafe enum, but subclassable so you can add your own good hands (or scoring system).
Constructor Summary | |
HandType(java.lang.String name,
int score)
Constructs a new HandType |
Method Summary | |
boolean |
beats(HandType h)
Returns true if this hand beats another hand. |
java.lang.String |
getName()
Returns name of the hand. |
int |
getScore()
Returns an arbitrary score for this hand. |
java.lang.String |
toString()
Returns name of the hand. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TOTAL_HANDS
public static final int NOTHING_HANDS
public static final double NOTHING_CHANCE
public static final int NOTHING_SCORE
public static final int ONE_PAIR_HANDS
public static final double ONE_PAIR_CHANCE
public static final int ONE_PAIR_SCORE
public static final int TWO_PAIR_HANDS
public static final double TWO_PAIR_CHANCE
public static final int TWO_PAIR_SCORE
public static final int THREE_OF_A_KIND_HANDS
public static final double THREE_OF_A_KIND_CHANCE
public static final int THREE_OF_A_KIND_SCORE
public static final int STRAIGHT_HANDS
public static final double STRAIGHT_CHANCE
public static final int STRAIGHT_SCORE
public static final int FLUSH_HANDS
public static final double FLUSH_CHANCE
public static final int FLUSH_SCORE
public static final int FULL_HOUSE_HANDS
public static final double FULL_HOUSE_CHANCE
public static final int FULL_HOUSE_SCORE
public static final int FOUR_OF_A_KIND_HANDS
public static final double FOUR_OF_A_KIND_CHANCE
public static final int FOUR_OF_A_KIND_SCORE
public static final int STRAIGHT_FLUSH_HANDS
public static final double STRAIGHT_FLUSH_CHANCE
public static final int STRAIGHT_FLUSH_SCORE
public static final int ROYAL_FLUSH_HANDS
public static final double ROYAL_FLUSH_CHANCE
public static final int ROYAL_FLUSH_SCORE
public static final HandType NOTHING
public static final HandType ONE_PAIR
public static final HandType TWO_PAIR
public static final HandType THREE_OF_A_KIND
public static final HandType STRAIGHT
public static final HandType FLUSH
public static final HandType FULL_HOUSE
public static final HandType FOUR_OF_A_KIND
public static final HandType STRAIGHT_FLUSH
public static final HandType ROYAL_FLUSH
Constructor Detail |
public HandType(java.lang.String name, int score)
Method Detail |
public java.lang.String toString()
public java.lang.String getName()
public boolean beats(HandType h)
public int getScore()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |