Skip to content
Open
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions 3.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export function canExecuteFastAttack(knightIsAwake) {

return !KnightIsAwake;
Copy link
Member

@Ifycode Ifycode May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since i don't know if it's in one function or all functions, I'm just going to give a "general" review for all the functions.

You didn't include the constants or variables you declared for knightIsAwake and others inside your code. So I don't know if you used true or false value. I don't have super powers to read your mind, nor can I know what you did on exercism.

Which is why I wrote in the instruction that you should replace the content of this file with what you have on exercism.

So remove the entire content of this file and add the exact content you have on exercism - including the variables you declared... include everything. Also let me know which of the functions you have issues with after you have done this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i went back to the code after reading your comments and its working now. i changed the const declaration to a var declaration so it ran. thank you ma.

}

export function canSpy(knightIsAwake, archerIsAwake, prisonerIsAwake) {

return knightIsAwake || archerIsAwake || prisonerIsAwake;
}

export function canSignalPrisoner(archerIsAwake, prisonerIsAwake) {

return prisonerIsAwake && !archerIsAwake;
}

export function canFreePrisoner(
Expand All @@ -16,5 +16,5 @@ export function canFreePrisoner(
prisonerIsAwake,
petDogIsPresent
) {

return (petDogIsPresent && !archerIsAwake) || (prisonerIsAwake && !knightIsAwake && !archerIsAwake);
}