-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInfoPack.java
More file actions
43 lines (33 loc) · 752 Bytes
/
Copy pathInfoPack.java
File metadata and controls
43 lines (33 loc) · 752 Bytes
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
public class InfoPack {
private int size;
private MyQueue<Integer> whites;
private MyQueue<Integer> blacks;
public InfoPack() {
size = 0;
whites = new MyQueue<Integer>();
blacks = new MyQueue<Integer>();
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
public MyQueue<Integer> getWhites() {
return this.whites;
}
public void setWhites(MyQueue<Integer> whites) {
this.whites = whites;
}
public MyQueue<Integer> getBlacks() {
return this.blacks;
}
public void setBlacks(MyQueue<Integer> blacks) {
this.blacks = blacks;
}
public void addPebble(int position,int color) {
if(color == Board.BLACK)
blacks.enqueue(position);
else whites.enqueue(position);
}
}