se.chalmers.dat255.risk.model
public class Deck extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
CreateCards(java.util.ArrayList<java.lang.String> provinces,
int nbrOfJokers)
Constructs the cards in the deck given an array containing the names of
all provinces in the game and the number of jokers there should be in the
deck.
|
static void |
discard(ICard card)
Method which adds the given card to the list of discarded cards.
|
static java.util.LinkedList<ICard> |
getDeckList() |
static java.util.LinkedList<ICard> |
getDiscard() |
static Deck |
getInstance() |
static int |
getSize() |
static ICard |
giveCard()
Method for dealing a card.
|
static void |
recycleCards()
Method for shuffling and moving the discarded cards into the deck.
|
public void CreateCards(java.util.ArrayList<java.lang.String> provinces, int nbrOfJokers)
provinces
- array with the names of all provinces.nbrOfJokers
- number of jokers in the deck.public static ICard giveCard()
public static void discard(ICard card)
card
- the card being discarded.public static void recycleCards()
public static int getSize()
public static java.util.LinkedList<ICard> getDeckList()
public static java.util.LinkedList<ICard> getDiscard()
public static Deck getInstance()