Package javatro.core

Class Deck

java.lang.Object
javatro.core.Deck

public class Deck extends Object
  • Constructor Details

    • Deck

      public Deck(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 Details

    • draw

      public Card draw() throws JavatroException
      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

      public ArrayList<Card> getWholeDeck()
      Returns an ArrayList containing all the remaining cards in the deck
    • getDeckName

      public Deck.DeckType 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()