Newer
Older
import java.util.List;
import javafx.scene.paint.Color;
import model.Board;
import model.Entity;
import model.Square;
import util.Position;
public class Rockery implements Entity{
private final int priority = 0;
Position position;
private int age;
private int burn;
private final Color viewColor = Color.LIMEGREEN;
private static javafx.scene.image.Image cloudImage;
static {
try {
cloudImage = new javafx.scene.image.Image(Cloud.class.getResource("/view/icons/rochers.png").toExternalForm());
} catch (Exception e) {
e.printStackTrace();
}
}
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
public Rockery(Position p ){
this.position = p;
this.burn = 0;
}
public Rockery(Position p , int age){
System.out.println("age : " + age);
this.position = p;
this.age = age;
}
@Override
public List<Position> nextTurn(Board<Square> board) {
return List.of();
}
@Override
public Position getPosition() {
return this.position;
}
public int getBurn(){
return this.burn;
}
public void incrementBurn(){
this.burn = burn + 1;
}
@Override
public void setPosition(Position p) {
this.position = p;
}
@Override
public int getAge() {
return this.age;
}
@Override
public void setAge(int age) {
this.age = age;
}
@Override
public void incrementAge() {
this.age += 1;
}
@Override
public Color getViewColor() {
return this.viewColor;
}
@Override
public int getPriority() {
return this.priority;
}
public void resetBurn() {
this.burn = 0;
}
@Override
public javafx.scene.image.Image getImage() {
return cloudImage;
}