Skip to content

Latest commit

 

History

History
17 lines (8 loc) · 1.43 KB

tasks.md

File metadata and controls

17 lines (8 loc) · 1.43 KB
  1. Check if a fast attack can be made

Define the CanFastAttack() function that takes a boolean value that indicates if the knight is awake. This function returns true if a fast attack can be made based on the state of the knight. Otherwise, returns false

  1. Check if the group can be spied upon

Define the CanSpy() function that takes three boolean values, indicating if the knight, archer and the prisoner, respectively, are awake. The function returns true if the group can be spied upon, based on the state of the three characters. Otherwise, returns false

  1. Check if the prisoner can be signaled

Define the CanSignalPrisoner() function that takes two boolean values, indicating if the archer and the prisoner, respectively, are awake. The function returns true if the prisoner can be signaled, based on the state of the two characters. Otherwise, returns false

  1. Check if the prisoner can be freed

Define the CanFreePrisoner() function that takes four boolean values. The first three parameters indicate if the knight, archer and the prisoner, respectively, are awake. The last parameter indicates if Annalyn's pet dog is present. The function returns true if the prisoner can be freed based on the state of the three characters and Annalyn's pet dog presence. Otherwise, it returns false