-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPlayer.java
99 lines (77 loc) · 1.79 KB
/
Player.java
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package rookCore;
import java.util.ArrayList;
/**
* Created by ashton on 12/29/14.
*/
public class Player {
public static Position position;
public String name;
protected Hand hand;
boolean passBid;
boolean check;
private boolean checkable;
private int currentBid;
public Player(String name) {
this.name = name;
this.passBid = false;
this.checkable = false;
}
public Player() {
this.name = "dummy";
this.hand = new Hand();
}
public boolean isCheckable() {
return checkable;
}
public void setCheckable(boolean b) {
this.checkable = b;
}
public boolean isCheck() {
return check;
}
public void setCheck(boolean b) {
this.check = b;
}
public boolean isPassBid() {
return passBid;
}
public void setPassBid(boolean passBid) {
this.passBid = passBid;
}
public ArrayList<Card> getHand() {
return hand.getCards();
}
protected void setHand(Hand hand) {
this.hand = hand;
}
public ArrayList<Card> getHand(Card.CARD_COLOR color) {
return hand.getCardsOfColor(color);
}
public int getCurrentBid() {
return currentBid;
}
public void setCurrentBid(int currentBid) {
this.currentBid = currentBid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
protected void setPosition(Position position) {
this.position = position;
}
public void addCard(Card c) {
this.hand.addCard(c);
}
public void addWidow(ArrayList<Card> widow) {
this.hand.addCards(widow);
}
public enum Position {
ONE,
TWO,
THREE,
FOUR;
}
}