Stuck on "Building a Simon Game " - Need advice

Hello!

I’m working through the Simon Game, and I’ve been stuck for a few days. I can’t seem to get the timing of displays within the game quite right. There are a few things that need to be cleaned up, but I’m mostly concerned with displaying the correct sequence of button presses for each new iteration. I know that I need to account for strict mode and update count. See link below.

I’m wondering if there’s something small I can tweak ? Or is there something wrong with my approach ? Should I look into different frameworks to animate the push button effect ? Or is there any resources on model / view / controller that are worth reading into ? I feel like there is something fundamental that I am missing.

I’ve hit a wall and any feedback is much appreciated .

Thanks in advance !

Where is the link ? Hello, how are you?

Sorry about that !

I think you want to use setInterval instead of setTimeout. setInterval will continuously run until cleared, while setTimeout only runs once. I would recommend looking to use the setInterval function and recursively call a function to display the sequence.

Also, jQuery actually has some animation effects which are what I ended up using to change the opacity of the colors on the fly to create the button lighting effect. Might be worth a look.

good luck!

I’ll look into those suggestions. Thank you very much!