Package javatro.core
Class Deck
java.lang.Object
javatro.core.Deck
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing the type of the deck. -
Constructor Summary
ConstructorsConstructorDescriptionDeck(Deck.DeckType deckType) Initialize the deck with cards that the player owns If no new cards owned or a new game has started, initializes a new deck -
Method Summary
Modifier and TypeMethodDescriptiondraw()Draws and returns a card from the top of the deckReturns an DeckType containing the deck variant you are usingintReturns an integer containing the cards left in the deckReturns an ArrayList containing all the remaining cards in the deckvoidvoidshuffle()Shuffle the deck you are using
-
Constructor Details
-
Deck
Initialize the deck with cards that the player owns If no new cards owned or a new game has started, initializes a new deck
-
-
Method Details
-
draw
Draws and returns a card from the top of the deck- Throws:
JavatroException
-
getRemainingCards
public int getRemainingCards()Returns an integer containing the cards left in the deck -
getWholeDeck
Returns an ArrayList containing all the remaining cards in the deck -
getDeckName
Returns an DeckType containing the deck variant you are using -
shuffle
public void shuffle()Shuffle the deck you are using -
populateWithSavedDeck
public void populateWithSavedDeck()
-