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.
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.
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?
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!