Package | Description |
---|---|
wcg.games |
Classes common to all card games.
|
wcg.games.war |
War is a very simple card game, mostly played by children.
|
wcg.shared.cards |
Card related types.
|
Modifier and Type | Method and Description |
---|---|
CardCollection |
CardCollection.addCard(CardSuit suit,
CardValue value)
Convenience methods to add card given suit and value.
|
int |
DefaultCardComparator.compare(CardValue o1,
CardValue o2)
Implementation of a method similar the
Comparator<CardValue> interface
using the the compareTo() method of Enum . |
int |
CardComparator.compare(CardValue o1,
CardValue o2)
Compare card values as in
Comparator |
CardCollection |
CardCollection.getCardsWithValue(CardValue value)
New collection with same comparator and the cards
with given value from any suit.
|
Modifier and Type | Method and Description |
---|---|
int |
WarCardComparator.compare(CardValue o1,
CardValue o2)
Similar order to the default but queens win over jacks.
|
Modifier and Type | Method and Description |
---|---|
CardValue |
Card.getValue() |
static CardValue |
CardValue.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CardValue[] |
CardValue.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Constructor and Description |
---|
Card(CardSuit suit,
CardValue value) |