Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
class AnnalynsInfiltration {
public static boolean canFastAttack(boolean knightIsAwake) {
return !knightIsAwake;
}

public static boolean canSpy(boolean knightIsAwake, boolean archerIsAwake, boolean prisonerIsAwake) {
return knightIsAwake || archerIsAwake || prisonerIsAwake;
}

public static boolean canSignalPrisoner(boolean archerIsAwake, boolean prisonerIsAwake) {
if(archerIsAwake == false && prisonerIsAwake == true){
return true;
}
else{return false;}
}

public static boolean canFreePrisoner(boolean knightIsAwake, boolean archerIsAwake, boolean prisonerIsAwake, boolean petDogIsPresent) {
//with dog
boolean withDog = petDogIsPresent && !archerIsAwake;
//without dog
boolean withoutDog = !petDogIsPresent && prisonerIsAwake && !archerIsAwake && !knightIsAwake;

return withDog || withoutDog;

}
}