-
Notifications
You must be signed in to change notification settings - Fork 0
/
Grey.java
34 lines (25 loc) · 833 Bytes
/
Grey.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
class Grey extends Alien {
protected int probeCounter;
public Grey() {
super(60, "grey", Weapon.STUN_GUN, 38, .14);
this.probeCounter = 0;
}
private void incrementProbeCounter() {
this.probeCounter += 1;
}
private int getProbeCounter() {
return this.probeCounter;
}
public String greyProbe(Character probeTarget) {
this.incrementProbeCounter();
return this.initiateProbe(probeTarget);
}
public String researchResults() {
return "Congratulations you have successfully probed " + this.getProbeCounter() + " humans. You are getting closer to Earth domination! " + "Your research knowledge grows by one third the amount of humans you probed!";
}
public String research() {
double researchGains = this.getProbeCounter() * .33;
this.rp += (int)researchGains;
return this.researchResults();
}
}