| Modifier and Type | Field | Description |
|---|---|---|
private Card[] |
Deck.cards |
a card array that holds all of the cards in Deck
|
static Card[] |
Deck.sorted |
Holds the sorted Card array in the mergeSort methods
|
| Modifier and Type | Method | Description |
|---|---|---|
Card[] |
Deck.getCards() |
Returns the value of the Card[] that Deck holds
|
Card |
Deck.pick() |
Returns and removes a random Card from the Deck
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
CardComparator.compare(Card card1,
Card card2) |
Compares two Cards
|
int |
Card.compareTo(Card other) |
Compares two Card objects using both suit and rank
|
private static void |
Deck.merge(Card[] temp,
int from,
int middle,
int to) |
Joins both sides of the array sent in back together.
|
private static void |
Deck.mSort(Card[] temp,
int from,
int to) |
The recursive sort part of MergeSort.
|
| Constructor | Description |
|---|---|
Deck(Card[] hands) |
Constructs a Deck object with a Card[]
|