Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gues who #348

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Gues who #348

wants to merge 4 commits into from

Conversation

hamdiolad
Copy link

No description provided.

Copy link

@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
@@ -2,8 +2,14 @@
const board = document.getElementById('board')
const questions = document.getElementById('questions')
const restartButton = document.getElementById('restart')
const winOrLose = document.getElementById('winOrLose')
const winOrLoseText = document.getElementById('winOrLoseText')
const playAgainButton = document.getElementById('playAgain')

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')

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')

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);}

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

// Invokes the start function when website is loaded
start()

// All the event listeners
restartButton.addEventListener('click', start)
find

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) => {

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 (confirmGuess) {
checkMyGuess(personToConfirm);
}
};

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

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