So im extremely close to finishing my simon game (and by extension the front end certificate) but I just need 1 more function to make the game work properly.
On line 59 I need to make a function to waits for the users turn, that waits (or counts) for them to click the full sequence and returns either true or false if the sequence of buttons they clicked was right or not. I cant manage to get it to wait for more than 1 button click or stop mid way through if they clicked something incorrect. This function is run each time a color button (green, red, blue or yellow) is clicked then the true or false is put into a different (working) function to carry on with the rest of the game.
In this code, aiAnswers is the array of colors that need to be compared e.g [“red”, "red, “green”, “blue”] ect.
Really appreciate any ideas or advice anyone could give.