Skip to content

Gues who#348

Open
hamdiolad wants to merge 4 commits intoTechnigo:mainfrom
hamdiolad:main
Open

Gues who#348
hamdiolad wants to merge 4 commits intoTechnigo:mainfrom
hamdiolad:main

Conversation

@hamdiolad
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@BreannaSand BreannaSand left a comment

Choose a reason for hiding this comment

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

Hey Hamdi! Great job getting back up to speed after losing all your work! It seems like your code is mostly there, it's just to keep playing around with the small bugs until you get it working. I identified some things that you can start with and from there it is hard to predict. I wish I could help you more so please write to me if you have any questions during your troubleshooting, I'd be happy to help if I can! Right now it's a little difficult to give any more without spending a lot of time because the webpage is only showing the interface of the starter code without any functionality and no board. Hopefully if you figure out the generateBoard thing I commented on it will make the rest easier to fix. Good luck! :)

code/script.js Outdated
const restartButton = document.getElementById('restart')
const winOrLose = document.getElementById('winOrLose')
const winOrLoseText = document.getElementById('winOrLoseText')
const playAgainButton = document.getElementById('playAgain')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Where is this button's event listener?

code/script.js Outdated
const winOrLose = document.getElementById('winOrLose')
const winOrLoseText = document.getElementById('winOrLoseText')
const playAgainButton = document.getElementById('playAgain')
const findOutButton = document.getElementById('filter')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This button also needs an event listener.

code/script.js Outdated
@@ -2,8 +2,14 @@
const board = document.getElementById('board')
const questions = document.getElementById('questions')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The dropdown menu needs an event listener.

code/script.js Outdated
}
}
// Invoke a function to redraw the board with the remaining people.
generateBoard(keep);}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I am guessing that your board isn't generating at the startup of the game when this function is called because "keep" doesn't have a value. I could be wrong as I can't get to that part in the code when I run it but when I try following the logic I don't see where the variable "keep" is ever actually assigned a value.

code/script.js Outdated

// All the event listeners
restartButton.addEventListener('click', start)
find No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm not sure that this needs to be here.

code/script.js Outdated

};

const filterCharacters = (keep, matchingCharacters) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There are two filterCharacter functions, when I plug your code into VScode it shows several functions that don't have closing curly brackets. Both filterCharacter functions and checkQuestion function.

};

// If you confirm, this function is invoked
const checkMyGuess = (personToCheck) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

checkMyGuess function has an error in the syntax of the if statement.

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