-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnnalynsInfiltration.java
32 lines (29 loc) · 1013 Bytes
/
AnnalynsInfiltration.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
class AnnalynsInfiltration {
public static boolean canFastAttack(boolean knightIsAwake) {
if (knightIsAwake == true) {
return false;
}
return true;
}
public static boolean canSpy(boolean knightIsAwake, boolean archerIsAwake, boolean prisonerIsAwake) {
if (knightIsAwake || archerIsAwake || prisonerIsAwake) {
return true;
}
return false;
}
public static boolean canSignalPrisoner(boolean archerIsAwake, boolean prisonerIsAwake) {
if (!archerIsAwake && prisonerIsAwake) {
return true;
}
return false;
}
public static boolean canFreePrisoner(boolean knightIsAwake, boolean archerIsAwake, boolean prisonerIsAwake, boolean petDogIsPresent) {
if (petDogIsPresent && !archerIsAwake) {
return true;
}
if (!knightIsAwake && !archerIsAwake && prisonerIsAwake && !petDogIsPresent) {
return true;
}
return false;
}
}