-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnit.java
48 lines (41 loc) · 923 Bytes
/
Unit.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
public class Unit
{
protected int atkRating;
protected int defRating;
protected boolean armor;
protected boolean prestrike;
protected int mobility;
protected int cost;
public Unit()
{
atkRating = 0;
defRating = 0;
armor = false;
prestrike = false;
mobility = 0;
}
public int getAtkRating()
{
return atkRating;
}
public int getDefRating()
{
return defRating;
}
public boolean getArmor()
{
return armor;
}
public boolean getPrestrike()
{
return prestrike;
}
public int getMobility()
{
return mobility;
}
public String toString()
{
return "Attack Rating: "+atkRating+", Defense Rating: "+defRating+", Armor: "+armor+", Prestrike: "+prestrike+", Mobility: "+mobility;
}
}