Package game

Klasse Deck

java.lang.Object
game.Deck

public class Deck extends Object
This class provides the functionality of a deck of cards
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Constructor for the class Deck
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    game.cards.Card
    This method draws and returns the first card
    boolean
    Checks if this deck is empty
    void
    This method randomly shuffles the deck

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • Deck

      public Deck()
      Constructor for the class Deck
  • Methodendetails

    • shuffle

      public void shuffle()
      This method randomly shuffles the deck
    • draw

      public game.cards.Card draw()
      This method draws and returns the first card
      Gibt zurück:
      Returns card, in case of empty deck returns null
    • isEmpty

      public boolean isEmpty()
      Checks if this deck is empty
      Gibt zurück:
      If this deck is empty