-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathABUnit.java
More file actions
73 lines (52 loc) · 933 Bytes
/
Copy pathABUnit.java
File metadata and controls
73 lines (52 loc) · 933 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
public class ABUnit {
private int x;
private int y;
private int id;
public boolean isEmpty() {
return empty;
}
public void setEmpty(boolean empty) {
this.empty = empty;
}
public boolean hasGold() {
return gold;
}
public void setGold(boolean gold) {
this.gold = gold;
}
public boolean hasWood() {
return wood;
}
public void setWood(boolean wood) {
this.wood = wood;
}
private boolean empty;
private boolean gold;
private boolean wood;
public ABUnit(int x, int y, int id, boolean empty, boolean gold, boolean wood){
this.x = x;
this.y = y;
this.id = id;
this.empty = empty;
this.gold = gold;
this.wood = wood;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = (int)x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = (int)y;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}