-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataPackage.java
More file actions
35 lines (32 loc) · 1.18 KB
/
DataPackage.java
File metadata and controls
35 lines (32 loc) · 1.18 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
import java.io.Serializable;
import java.util.ArrayList;
public class DataPackage implements Serializable{
/**
* DataPackage contains all the info from the server that need to be passed to Client and SwingWorker
*/
private static final long serialVersionUID = 1L;
private final ArrayList<Player> players; //the array list of players currently in the game
private final ArrayList<Player> waiting; //the array list of players that are waiting the round to be finished so they can enter the game
private final boolean newRound; //a boolean value that indicates if there is a new round
private final int cardsBeenPlayed; //an integer of the amount of cards that have been drawn from the deck
//constructor
public DataPackage(ArrayList<Player>players,ArrayList<Player> waiting,boolean newRound,int cardsBeenPlayed) {
this.players=players;
this.waiting=waiting;
this.newRound=newRound;
this.cardsBeenPlayed=cardsBeenPlayed;
}
//getters
public ArrayList<Player> getPlayers() {
return players;
}
public ArrayList<Player> getWaiting(){
return waiting;
}
public boolean getNewRound() {
return newRound;
}
public int getCardsBeenPlayed(){
return cardsBeenPlayed;
}
}