Closed Aegyo closed 7 years ago
So date started is overwitten?
I'd like for it to never be overwritten?
It is overwritten from your savegame if it exists there.
If it doesn't then it just uses the date when you loaded the page, every time after it finds that old date in your savegame and uses that instead.
Woops sorry, didn't read the dateStarted variable!
On loading the page, a new Date() is created and set as dateStarted, and this is replaced if savegame contains dateStarted.
Total time spent playing is updated in save(), lastSaved is updated on load so that time spent with the game closed is not counted.