public abstract class AbstractDeck<T> extends java.lang.Object implements Deck<T>
| Constructor and Description | 
|---|
AbstractDeck()  | 
AbstractDeck(java.util.List<T> cardList)
Initializes the deck with cards 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
draw(Deck<T> other)
Draws one card from the other deck 
 | 
void | 
draw(Deck<T> other,
    int n)
Draws multiple cards from the other deck 
 | 
void | 
emptyInto(Deck<T> other)
Empty the entire deck into the other deck 
 | 
java.util.List<T> | 
getCards()
Gets a list of all the cards in the deck 
 | 
boolean | 
isEmpty()
Checks if the deck is empty 
 | 
T | 
peekBottom()
Looks at the bottom card of the deck 
 | 
T | 
peekTop()
Looks at the top card in the deck 
 | 
void | 
shuffle()
Randomises the order of the deck 
 | 
int | 
size()
Gets the size of the deck 
 | 
java.lang.String | 
toString()
Gets the card from the deck in String format 
 | 
public AbstractDeck()
public AbstractDeck(java.util.List<T> cardList)
cardList - list of cardspublic void shuffle()
public boolean isEmpty()
public int size()
public java.util.List<T> getCards()
public java.lang.String toString()
toString in class java.lang.Objectpublic T peekTop()
public T peekBottom()
peekBottom in interface Deck<T>