-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tower.java
74 lines (39 loc) · 1.29 KB
/
Tower.java
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
74
package game;
import java.util.List;
public interface Tower
{
//ACCESSOR METHODS
public int getDamage();
public int getRange();
public int getAttackSpeed();
public int getRank();
public int getCost();
public int getUpgradeCost();
public Location getLocation();
public int getTowerID();
public Enemy getTarget();
public int getLifetime();
//MUTATOR METHODS
public void setDamage(int dmg);
public void setRange(int rn);
public void setAttackSpeed(int speed);
public void setRank(int r);
public void setCost(int c);
public void setUpgradeCost(int c);
public void setLocation(Location loc);
public void setTowerID(int id);
public void setTarget(Enemy e);
public void setLifetime(int l);
//SPECIAL METHODS
public void upgrade();
public void attack(List<Enemy> enemies);
public Enemy getLastTarget();
public int updateLifetime(int a);
public boolean hasEnemiesInRange(List<Enemy> enemies);
public int getTowerType();
public boolean isSelected();
public void setSelected(boolean b);
public void decrID();
public void setAttacking(boolean b);
public boolean isAttacking();
}