public class Hand
extends java.lang.Object
| Constructor and Description |
|---|
Hand()
Creates an empty hand
|
| Modifier and Type | Method and Description |
|---|---|
Card |
getCard(int card)
Returns the reference for the card in a given position without removing it from the hand
|
Card |
retrieveCard(int card)
Retrieves card of a given position in hand
|
void |
saveCard(Card card)
Puts a card in the first empty position in hand
|
private Card[] cards
public Card retrieveCard(int card)
card - Index that identifies the card to retrievepublic Card getCard(int card)
card - Index that identifies the card to showpublic void saveCard(Card card)
card - Card to save in hand