-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiplayerRoom.java
More file actions
52 lines (42 loc) · 1.12 KB
/
Copy pathmultiplayerRoom.java
File metadata and controls
52 lines (42 loc) · 1.12 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
51
52
import java.io.DataInputStream;
import java.io.DataOutputStream;
public class multiplayerRoom {
private int playermax;
private String difficulty;
private DataInputStream[] ins;
private DataOutputStream[] outs;
int players;
int roomindex;
public multiplayerRoom(int playermax, String difficulty){
this.playermax = playermax;this.difficulty = difficulty;
ins = new DataInputStream[playermax];
outs = new DataOutputStream[playermax];
players = 0;
}
public void setRoomindex(int index){
roomindex = index;
}
public int getRoomindex(){
return roomindex;
}
public String getDifficulty() {
return difficulty;
}
public int getPlayermax() {
return playermax;
}
public DataInputStream[] getIns() {
return ins;
}
public void setDatastream(DataInputStream in,DataOutputStream out) {
this.ins[players] = in;
this.outs[players] = out;
players++;
}
public DataOutputStream[] getOuts() {
return outs;
}
public int getplayers(){
return players;
}
}