-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeaknessCheck.java
More file actions
26 lines (20 loc) · 931 Bytes
/
WeaknessCheck.java
File metadata and controls
26 lines (20 loc) · 931 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
public class WeaknessCheck {
public static void main(String[] args) {
// TODO Auto-generated method stub
//adding zombies and their weakness and/or strengths
ZombieTypes zombie = new ZombieTypes();
zombie.addZombiesWeakness("runner", "achilles heel");
zombie.addZombiesWeakness("big", "fire");
zombie.addZombiesWeakness("biter", "armor");
zombie.addZombiesWeakness("armored", "crossbow");
zombie.addZombiesStrength("runner", "fast");
zombie.addZombiesStrength("big", "strong");
zombie.addZombiesStrength("biter", "sharp teeth");
zombie.addZombiesStrength("armored", "durable");
//check that correct weakness is pulled up by searching a type
System.out.println(zombie.getWeakness("runner"));
//print full list of types and weakness/strengths
System.out.println("Weaknesses are " + zombie.weakness);
System.out.println("Strengths are " + zombie.strengths);
}
}