-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClientPackage.java
More file actions
50 lines (47 loc) · 1.23 KB
/
ClientPackage.java
File metadata and controls
50 lines (47 loc) · 1.23 KB
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
import java.io.Serializable;
public class ClientPackage implements Serializable {
/**
* ClientPackage contains all the data that are sent from Client to Server
*/
private static final long serialVersionUID = 1L;
//attribute
private final Player player; //each Client Package is sent by a specific Player-Client
private final boolean hit; //boolean values that depict player's behavior in the game
private final boolean stand;
private final boolean newPlayer;
private final boolean bet;
private final int bettingAmount;
private final boolean newRound;
//constructor
public ClientPackage(Player player, boolean hit,boolean stand,boolean newPlayer,boolean bet,int bettingAmount,boolean newRound) {
this.player=player;
this.hit=hit;
this.stand=stand;
this.newPlayer=newPlayer;
this.bet=bet;
this.bettingAmount=bettingAmount;
this.newRound=newRound;
}
//getters
public Player getPlayer() {
return player;
}
public boolean getHit() {
return hit;
}
public boolean getStand() {
return stand;
}
public boolean getNewPlayer() {
return newPlayer;
}
public boolean getBet() {
return bet;
}
public int getBettingAmount() {
return bettingAmount;
}
public boolean getNewRound() {
return newRound;
}
}