-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.java
45 lines (41 loc) · 908 Bytes
/
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
public interface Player {
// enum Action{PASS,PLAY}
/**add to the players hand
* @param c: Card to add
*/
void addCard(Card c);
/**
* add all the cards in h to the players hand
* @param h: hand to add
*/
void addHand(Hand h);
/**
* @return number of cards left in the players hand
*/
int cardsLeft();
/**
* @param g: the player should contain a reference to the game it is playing in
*/
void setGame(CardGame g);
/**
* @param s: the player should contain a reference to its strategy
*/
void setStrategy(Strategy s);
/**
* Constructs a bid when asked to by the game.
* @param b: the last bid accepted by the game. .
* @return the players bid
*/
Bid playHand(Bid b);
/**
*
* @param b: the last players bid
*
* @return true if calling the last player a cheat.
*/
boolean callCheat(Bid b);
/*
including additional accessor method for use in testing
*/
Hand getHand();
}