public class Player
extends java.lang.Object
Constructor and Description |
---|
Player(Team team,
java.util.ArrayList<Card> hand)
A Constructor that sets the players team and hand, while setting
dealer to false.
|
Modifier and Type | Method and Description |
---|---|
Card |
getCard(int cnum)
A accessor that returns the Card given by a certain index.
|
java.util.ArrayList<Card> |
getHand()
A accessor that returns the hand.
|
Team |
getTeam()
A accessor that returns the players team.
|
boolean |
isDealer()
A method that returns if the player is the dealer or not.
|
void |
setCard(Card c)
A mutator to set a card to a certain index in the hand.
|
void |
setDealer(boolean dealer)
A method that sets the boolean to whether or not the player is
the dealer.
|
void |
setHand(java.util.ArrayList<Card> hand)
A mutator that sets the hand.
|
void |
setTeam(Team team)
A mutator that sets the team of the player.
|
public java.util.ArrayList<Card> getHand()
public void setHand(java.util.ArrayList<Card> hand)
hand
- the players hand to be setpublic void setCard(Card c)
c
- the card to set to the indexpublic Card getCard(int cnum)
cnum
- the index in the arraypublic Team getTeam()
public void setTeam(Team team)
team
- The desired team to setpublic boolean isDealer()
public void setDealer(boolean dealer)
dealer
- the desired boolean for this player