Simon Game Help!

I need help with making Simon Game. I made a function to check if the computer raandom clicks are the same as the player clicks. But every time when I click start it displays ‘try again’. I don’t know what to change to make this function check every time the user clicks.

Please help! Here

Well you call newRound function in startGame function, and newRound calls for checkClicks which is probably why you get a ‘try again’ alert when you click start.

1 Like

Thanks, but what should I do to make this function run every time the user clicks on a button to compare it to the seq array, or should I remove that function when the user clicks Start?

But when I click on a button the usrClick() function pushes values to the userClicks array

Ok, thanks for the help! :slight_smile:

I’m making a Simon game and I’ve already added the logic but I don’t know how to pause an execution untill the player has pressed on a tile. I’ve made a function called user() that records users input and pushes it to the userSeq array. Then I made a function checkTurn() to check who’s turn is next (the computer or the user). If it’s the user’s turn then I want in the else to wait for the user() function to finish and then call the callcheckClicks() to check if user’s input is the same as computer’s. Please help! :slight_smile: