+ 1

Simon Game (Aiming to have a last level and remaining lives)

Reference from Udemy Course by Angela, with an additional features to have a remaining lives and with a last level of 20. This is my code : https://code.sololearn.com/W6p1zK6BYef3 I have been working these for a week. I tried to insert loop on checkAnswer function where max level is 20 but still not working and the remaning lives is not deducting until I get a 0 value. I can't find the solution on other references like youtube since it's very different. Is there any idea what logic/solution and is it right that I should play only on the checkAnswer function to get the answer?

20th May 2022, 8:34 AM
Jules
Jules - avatar
3 Answers
+ 1
This example could help you as I think: https://code.sololearn.com/WDWbZz7BkkuU/?ref=app
20th May 2022, 11:25 AM
JaScript
JaScript - avatar
+ 1
Thanks for your response. It helped me to solved the remaining lives thing. Now my only goal is how can I insert the max level of 20 in the code.
21st May 2022, 1:16 AM
Jules
Jules - avatar
+ 1
In the code can be checked the level, for example before it will be increased and then you can continue play or if the level is already 20 stop the game.
21st May 2022, 9:48 AM
JaScript
JaScript - avatar