I’ve been working on Simon for ages. Like seriously…maybe a year. It’s my only challenge left for front end cert, and with the new curriculum coming, I just want to get it finished before the whole thing changes again.
I redid my whole code base and am trying to use what i’ve learned since my last attempt to finish it to clean up code.
My current question is passing game play back adn forth between the computer and the player…this can’t be as simple as call the computer then call the player, it needs to be responsive right? When the computer is done…then the player can try…
Here’s my codepen…I’m not asking for the solution but just a tip on what others did. My first time around I was able to pass game play back and forth by calling playerTurn within the computer function and vice versa. not sure that’s a good strategy due to memory usage…although maybe it is the correct way to do it?
Currently the game is hardcoded at the 5th round, so it will start to play as soon as you run it. If that’s annoying you can just go in and change the hard coding.