Package | Description |
---|---|
wcg.games |
Classes common to all card games.
|
wcg.games.war |
War is a very simple card game, mostly played by children.
|
Modifier and Type | Class and Description |
---|---|
class |
DefaultCardComparator
A default implementation implementation of
CardComparator
based on the ranks of suits and values as defined by the respective
enumerations. |
Modifier and Type | Field and Description |
---|---|
(package private) CardComparator |
CardCollection.comparator |
Modifier and Type | Method and Description |
---|---|
CardComparator |
CardCollection.getCardComparator()
Card comparator used by this card collection.
|
CardComparator |
GameBot.getCardComparator()
Card comparator for this game
|
protected CardComparator |
GameMaster.getCardComparator()
The card comparator used in this game.
|
Modifier and Type | Method and Description |
---|---|
static CardCollection |
CardCollection.getDeck(CardComparator comparator)
A {code CardCollection} with a deck of cards of all suits and values
with given card comparator
|
static CardCollection |
CardCollection.getFullDeck(CardComparator comparator)
A
CardCollection with a full deck of cards, including 2 jokers,
backed by the given card comparator |
Constructor and Description |
---|
CardCollection(CardComparator comparator)
An empty instance backed by the given
CardComparator . |
CardCollection(CardComparator comparator,
java.util.List<Card> cards)
An instance backed by the given
CardComparator
and populated with given list of cards. |
Modifier and Type | Class and Description |
---|---|
class |
WarCardComparator
A specialization of
CardComparator for the this game. |
Modifier and Type | Method and Description |
---|---|
protected CardComparator |
WarGameMaster.getCardComparator()
War uses a special card comparator, defined in this package
|