I’ve been working on my Simon game trying to get it functional before making it look good. I made pretty good progress and it works fine (although if you hit “reset” it then breaks the game and adds two clicks whenever you click a box, will try and figure that out later though!).
My huge problem at the moment is “locking” the system when Simon is doing his moves. At the moment you can just click the colours when they are flashing, which is obviously not the point of the game. I’ve tried a system lock function that locks the player out from clicking, that works fine, but I can’t get it to unlock again after Simon has finished.
I used a setTimeout(lockOff) approach which according to my test text does unlock the game at the right time, but then I still can’t click on anything afterwards.
If anyone could have a look and offer some advice that would be hugely appreciated. I’m not really happy with how I’ve done the coding, feel like it is a mess and might be why things aren’t happening how I want them to, but I’m really at a loose end at the moment and don’t know how to solve it.
This is my pen, thank you for reading.