@senocular. LOL. I have told a few others about your reply here and they have all LOL. also.
The video above was certainly the secret sauce to what I needed to get what I was looking for once you either guess the correct number, or the timer runs out.
If you surf around the website where this is, you can find the parts of the book I have completed so far, as well as all my Web Programming homework in the degree program I have complete thus far. Please don’t judge too harshly ;-). You can review my profile on this forum to get more information on who I am and what I trying to do here.
Finally, there are lots of things to add to this program, and I need to get to the SPA chapter 18 to add a few more items I wish to add to this program…
- Add a starting page where the player can choose easy, medium, or hard, and then offer 0 to 999 ( easy ), 0 to 999,999 ( medium ), etc.
- Add a max number of guesses even if time has not run out as another way the player could lose the game.
- Add the to do list app type functionality where the last 5 guesses or whatever are shown in a rotating list below the current information of the webpage. The list would show each guess and the result ( higher or lower ). As the user adds another guess the oldest guess drops off and the newer guess shows on the top of the list of guesses and results.
- Add more color and action, like have the clock ticks turn the timer yellow when the time gets below 10 seconds, and then red when the time gets below 5 seconds. More action when the correct guess is provided. All kinds of things to add here to make it better.
Oh well, the best thing about computer programs is that they are never completed or correct, they are all just works in progress that can get better and better.
I have a quote from somewhere… “Computer programs don’t actually function, they are only varying degrees of less broken.”
Finally, Finally, Kirupa.
Suggestion for the Book. Move Chapter 13 ( Build a React app - the “npm” Chapter as I call it ) move it to much earlier in the book.
Onward and Upward!