public class User
extends java.lang.Object
Constructor | Description |
---|---|
User() |
|
User(java.lang.String name) |
create a user
|
Modifier and Type | Method | Description |
---|---|---|
void |
addCard(Card card) |
remove a card from user cards
|
boolean |
equals(java.lang.Object o) |
|
java.lang.String |
getName() |
|
int |
getScore() |
at the end of the game returns the score of user
|
java.util.ArrayList<Card> |
getUserCards() |
|
int |
hashCode() |
|
User |
pass(java.util.ArrayList<User> users,
User chosenUser) |
|
void |
printCards(java.util.ArrayList<User> users) |
show the order of players and chosen user cards
|
public void addCard(Card card)
public java.lang.String getName()
public int getScore()
public User pass(java.util.ArrayList<User> users, User chosenUser)
users
- list of userschosenUser
- is current userpublic java.util.ArrayList<Card> getUserCards()
public void printCards(java.util.ArrayList<User> users)
users
- is the list of userspublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object