public class CardDeck
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CARDS_IN_PLAYER_DECK
Each player starts with a unique deck of cards.
|
| Constructor and Description |
|---|
CardDeck(EnumRegion playerRegion)
Each player region has a unique deck to be read from
.cvs file: playerRegion(String), card(String), count(int).
In future versions, players will be able to produce and save custom decks. In this pre-test version, cards are just randomly picked with no difference for different player regions. |
| Modifier and Type | Method and Description |
|---|---|
int |
cardsRemainingInDrawPile() |
void |
discard(EnumPolicy card) |
EnumPolicy[] |
drawCards()
Returns an array of cards drawn from the top of the deck so that
the player who own's this deck has a total of 7 cards in hand.
If there are insufficient cards remaining, then the player's discard pile is shuffled back into the deck. |
static void |
main(java.lang.String[] args)
This entry point is for testing only.
|
public static final int CARDS_IN_PLAYER_DECK
public CardDeck(EnumRegion playerRegion)
public EnumPolicy[] drawCards()
public void discard(EnumPolicy card)
public int cardsRemainingInDrawPile()
public static void main(java.lang.String[] args)
args - ignored.