Deck
Date: 2017-05-13

game_backend

## Class Deck

- java.lang.Object
- - game_backend.Deck

-     public class Deck
      extends java.lang.Object

  Represents a full deck with N cards.
  Author:
    João Vieira, Guilherme Reis, Catarina Santos

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.ArrayList<Card>` | `deck`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Deck()` Constructor for Deck.
    `Deck(java.util.ArrayList<Card> cards)` Constructor for Deck.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCard(Card card)` Adds a card to the end of the deck
    `Card` | `removeCard()` Removes a card from the beginning of the deck
    `void` | `shuffle()` Shuffles the deck.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### deck

          private java.util.ArrayList<Card> deck

  - ### Constructor Detail

    - #### Deck

          public Deck()

      Constructor for Deck. If no arguments are specified, this constructor is called and the deck will be filled with the regular 52 cards

    - #### Deck

          public Deck(java.util.ArrayList<Card> cards)

      Constructor for Deck. If an array of cards are provided to the constructor, the deck will be filled with those cards.
      Parameters:
        `cards` - List of cards to fill the deck

  - ### Method Detail

    - #### addCard

          public void addCard(Card card)

      Adds a card to the end of the deck
      Parameters:
        `card` - Card that will be added to the deck

    - #### removeCard

          public Card removeCard()

      Removes a card from the beginning of the deck
      Returns:
        Card Card that has been removed from the beginning of the decks

    - #### shuffle

          public void shuffle()

      Shuffles the deck. This is achieved by performing deck.size() ** exchageFactor random exchanges