Package it.polimi.ingsw.model.leadercard
Class LeaderCardDeck
java.lang.Object
it.polimi.ingsw.model.leadercard.LeaderCardDeck
public class LeaderCardDeck
extends java.lang.Object
Represents the deck of leader cards before they are distributed to the players
-
Constructor Summary
Constructors Constructor Description LeaderCardDeck() -
Method Summary
Modifier and Type Method Description java.util.List<LeaderCard>drawFourCards()draws 4 cards from the deck and returns them as a listLeaderCardgetCardFromId(int id)get the leaderCard corresponding to the specified IdvoidshuffleLeaderList()Randomly permutes leaderCards in the deckMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
LeaderCardDeck
public LeaderCardDeck()
-
-
Method Details
-
shuffleLeaderList
public void shuffleLeaderList()Randomly permutes leaderCards in the deck -
drawFourCards
draws 4 cards from the deck and returns them as a list- Returns:
- the 4 drawn cards
-
getCardFromId
get the leaderCard corresponding to the specified Id- Parameters:
id- Id of the leaderCard to get- Returns:
- the the leaderCard corresponding to the specified Id
- Throws:
InvalidCardException- if there isn't a card with the specified id in the deck
-