Skip to content

Fix: Change to False#2235

Closed
copydataai wants to merge 1 commit intoexercism:mainfrom
copydataai:main
Closed

Fix: Change to False#2235
copydataai wants to merge 1 commit intoexercism:mainfrom
copydataai:main

Conversation

@copydataai
Copy link
Copy Markdown

Why: because if the prisoner is sleeping he cannot be rescued

pull request

link from the problem: https://exercism.org/tracks/java/exercises/annalyns-infiltration
Text of the logic or validations:
Free prisoner: Annalyn can try sneaking into the camp to free the prisoner. This is a risky thing to do and can only succeed in one of two ways:
If Annalyn has her pet dog with her she can rescue the prisoner if the archer is asleep. The knight is scared of the dog and the archer will not have time to get ready before Annalyn and the prisoner can escape.
If Annalyn does not have her dog then she and the prisoner must be very sneaky! Annalyn can free the prisoner if the prisoner is awake and the knight and archer are both sleeping, but if the prisoner is sleeping they can't be rescued: the prisoner would be startled by Annalyn's sudden appearance and wake up the knight and archer.


Reviewer Resources:

Track Policies

Why: because if the prisoner is sleeping he cannot be rescued
@andrerfcsantos
Copy link
Copy Markdown
Member

Hey!

Why: because if the prisoner is sleeping he cannot be rescued

This is only valid for the second way the prisoner can be rescued. The first way (archer sleeping) doesn't depend on whether the prisoner is awake or not:

If Annalyn has her pet dog with her she can rescue the prisoner if the archer is asleep. The knight is scared of the dog and the archer will not have time to get ready before Annalyn and the prisoner can escape.

In both the test cases you changed this happens (archer sleeping and dog present), so it falls under this first scenario.

However, I do see how the instructions can be contradicting. The first scenario claims that if the archer is sleeping:

the archer will not have time to get ready but the second scenario claims that

But the second scenario claims that the archer can be awakened and now that's a problem:

if the prisoner is sleeping they can't be rescued: the prisoner would be startled by Annalyn's sudden appearance and wake up the knight and archer.

If you'd like, feel free to take this discussion to the forum and continue the discussion there. Since this exercise is present in several tracks, posting this problem there and gathering opinions from people from different tracks can be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants