-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathZone.java
More file actions
73 lines (59 loc) · 1.09 KB
/
Zone.java
File metadata and controls
73 lines (59 loc) · 1.09 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
public class Zone {
private String name;
private LevelEnum level;
private Color color;
private int points;
private int lifes;
Zone(String name, LevelEnum level) {
this.name = name;
this.level = level;
switch (level) {
case LEVEL1:
this.points = 100;
break;
case LEVEL2:
this.points = 200;
break;
case LEVEL3:
this.points = 400;
break;
default:
break;
}
this.lifes = level.getLevel();
color = null; // ?? :D
}
public String getName() {
return name;
}
public int getPoints() {
return points;
}
public void setColor(Color color) {
this.color = color;
}
public LevelEnum getLevel() {
return level;
}
public void setLifes(int lifes) {
this.lifes = lifes;
}
public Color getColor() {
return color;
}
public int getLifes() {
return lifes;
}
@Override
public String toString() {
return this.name + " | " + this.level;
}
//
// @Override
// public int compareTo(Zone toCmp) {
// if(this.name.compareTo(toCmp.getName()) > 0) return 1;
// else if(this.name.compareTo(toCmp.getName()) < 0) return -1;
//
// return 0;
// }
}