This is my participation in a Halloween themed coding challenge for W3 Schools. This application is not intended for publication, commercial use, or monetization.
The beginning animation should only play the first time the start button is selected. The startGame() feature will replay this animation every time it is clicked.
Priority
Low
User Impact (Priority Justification)
Users who elect to replay the game multiple times will get frustrated waiting for the game to start
I am probably the only person alive that will play this more than twice
This application serves no time-critical purpose (such as a banking app or enterprise software)
Functionality
When the user clicks the start button, the className is updated from startScreen to startscreenAnimated.
A 10 second timeout kicks off and then the startArea div is hidden, with the gameArea() div taking its place
Upon completion of the questions, the user is given an option to replay the game
Because the className change is tied to the startGame() feature, the animation plays again.
Solution Ideas
[ ] Add a variable and set the value to 0. Use an if condition to evaluate the variable and only change the class if the variable is still 0
[ ] Create a brand new function for the animation that fires based on conditions.
Description
The beginning animation should only play the first time the start button is selected. The
startGame()
feature will replay this animation every time it is clicked.Priority
Low
User Impact (Priority Justification)
Functionality
className
is updated fromstartScreen
tostartscreenAnimated
.startArea
div is hidden, with thegameArea()
div taking its placestartGame()
feature, the animation plays again.Solution Ideas