Annalyn’s infiltration

Hello,

I have troubles with Annalyn’s infiltration, too.

Where Only the prisoner is awake and Archer and prisoner is awake - it tells me that Annalyn should do fastAttack and she didn’t do that.

But I have fastAttack() mentioned there (only part of the code)

even when I tried to signalPrisoner (as he is only awake in first case) , or also freePrisoner after the attack, nothing helped.

Please advise.

Thanks.

Or, if the prisoner is awake, and both the knight and the archer are asleep, Annalyn can sneak in and free the prisoner herself. If the prisoner is asleep, it’s too risky that he’ll make a noise when he wakes.

If you’re still stuck, or if you need help in the future, please share your complete solution using a code block/preformatted text so others can access it. It’s also helpful to copy paste the exact error message.

1 Like

You may find it useful to use the scrubber to step through the code line by line and see what Jiki is doing on every line … or what lines get skipped!

1 Like

I used freePrisoner and still not correct when only Prisoner is awake (2nd else if):

if(knightIsAwake() === true || archerIsAwake() === true || prisonerIsAwake() === true) {
spy()
}

else if (!knightIsAwake() === true) {
fastAttack()
if(dogIsBehaving() === true && !archerIsAwake() === true) {
freePrisoner()
}
}
else if (prisonerIsAwake() === true && !knightIsAwake() === true && !archerIsAwake() === true && !dogIsBehaving() === true) {
freePrisoner()
}
else if (prisonerIsAwake() === true && !knightIsAwake() === true && archerIsAwake() === true && dogIsBehaving() === true) {
fastAttack()
}

error message is:

Only the prisoner is awake

Both kidnappers sleep while the prisoner lies awake. The dog is misbehaving — the sneaky route is open.

Fail

Annalyn should make a fast attack here, but she didn’t. The knight is asleep, so she can strike before he wakes.

Did you use the scrubber to step through the code and see what’s happening?

3 posts were split to a new topic: Annalyn’s infiltration help