Skip to content

Conversation

@Sheryll-Ann
Copy link

Copy link

@VAstrom VAstrom left a comment

Choose a reason for hiding this comment

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

Well done! I didn't encounter any bugs apart from the sound bug (which you mentioned in the description) at the start.
I like all the features you added like sounds, additional categories in the drop-down menu, name prompt and the counter for number of guesses. The card-flipping animation was really cool as well. All in all, these additions improve the user experience!
Nice solution for bypassing the bug where the default option (index[0]) couldn't be selected as the first guess.
I think the rules for the name input was interesting to see. At first I wasn't sure if they were too restrictive but I think they are okay. In all the games I have played there have been similar restrictions especially regarding what characters are allowed.

<link rel="shortcut icon" href="#">

- when selecting "brown hair" found at option [0], no change event is detected by the eventlistener -skipping the whole <selectQuestion> function, not passing the values <category> and <value> in <checkQuestion> (undefined) -<findOutbutton> does not react.
Also, an action on the board game predetermined by the option selected in the menu is activated only when the <findOutbutton> is clicked, and not the <change> event itself, thus making the eventlisterner <change> irrelevant if the <selectQuestion> is invoked directly in next <checkQuestion> function triggered by <findOutbutton> + erasing <questions.addEventListener('change', selectQuestion)>
Copy link

Choose a reason for hiding this comment

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

That's a nice alternative to changing the default value in the drop-down menu!

//Function to add user's name after a prompt message:
const addUserName = () => {
playerName = prompt(`Welcome to the game Guess who! Please enter your name:`)
const regex = /^[a-zA-Z]{2,}$/g;
Copy link

Choose a reason for hiding this comment

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

Have not seen this line of code before but I noticed after some testing that you can't enter a name unless it has more than two letters and some characters aren't allowed, so I'm guessing this is what sets up the rules for the name input. Had to do a bit of googling to understand it and learned something new! :)

const generateBoard = () => {
board.innerHTML = ''
charactersInPlay.forEach((person) => {
const shuffle = new Audio('./assets/shuffle.wav');
Copy link

Choose a reason for hiding this comment

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

The sound effects are a nice addition!

position: relative;
width: 100%;
height: 100%;
transition: transform 0.6s;
Copy link

Choose a reason for hiding this comment

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

Nice addition of the animation!

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