-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPlayer.java
More file actions
47 lines (38 loc) · 997 Bytes
/
Copy pathPlayer.java
File metadata and controls
47 lines (38 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import java.util.ArrayList;
import java.util.Scanner;
public class Player {
private String name;// players name
private ArrayList<Card> myCards;// players's card
public Player(String name, ArrayList<Card> myCards){
setName(name);
setPlayerCards(myCards);
}
public void setName(String name){
this.name = name;
setPlayerCards(myCards);
}
public void setPlayerCards(ArrayList<Card> myCards){
this.myCards = myCards;
}
public String getName(){
return name;
}
public ArrayList<Card> getPlayerCards(){
return myCards;
}
/**
* allow user to play its card
* @return the card which is played
*/
/*public Card playCard(){
Scanner scanner = new Scanner(System.in);
}
/**
* it will show user to which cards can be play
*/
public void playableCards(){
}
public String toString(){
return getName();
}
}