Open
Description
A common use-case is wanting to provide an option for resetting the game. The reccomended way to do this is by creating a flag gameOver
or gamePlaying
and check it where relevant, and reset it where relevant.
However, this is complicated. We could give students a reload()
primitive that reloads the page and resets the game. We can explain next to this primitive that if you want true resetting, you need to do the flag thing.