Fix an issue in game history

Chris Pollett [2023-02-01 04:Feb:st]
Fix an issue in game history
Filename
js/game.js
diff --git a/js/game.js b/js/game.js
index 3bbeee0..1ec6371 100644
--- a/js/game.js
+++ b/js/game.js
@@ -835,10 +835,10 @@ class Game
      */
     reset()
     {
-        this.history = [];
-        this.future_history = [];
+        sessionStorage.removeItem("current" + this.id);
         this.initializeMainNavGameContentArea();
         this.initializeObjectsLocations();
+        this.clearHistory();
     }
     /**
      * Sets up the main navigation bar and menu on the side of the screen
@@ -1059,6 +1059,8 @@ class Game
     {
         this.history = [];
         this.future_history = [];
+        elt('next-history').disabled = true;
+        elt('previous-history').disabled = true;
     }
     /**
      * Function called when the left arrow button on the main nav page is
@@ -1081,7 +1083,7 @@ class Game
         if (this.history.length == 0) {
             elt('previous-history').disabled = true;
         } else {
-            elt('previous-history').disabled = true;
+            elt('previous-history').disabled = false;
         }
         elt('next-history').disabled = false;
     }
ViewGit