Last active
August 29, 2015 14:04
-
-
Save ecoleman/50eed4879f02469a4e5b to your computer and use it in GitHub Desktop.
Revisions
-
ecoleman renamed this gist
Jul 17, 2014 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ // load the `gameState` param from localStorage and convert it from JSON to an object var game = JSON.parse(localStorage.getItem("gameState")); // after the above line, you can type `game` in your console to see what properties it has -
ecoleman created this gist
Jul 17, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // load the `gameState` param from localStorage and convert it from JSON to an object var game = JSON.parse(localStorage.getItem("gameState")); // after the above line, you can type `game` in your console to see what properties it has // change the `game.stores.wood` param to 15 game.stores.wood = 15; // re-encode the game state into json and update localStorage localStorage.setItem("gameState", JSON.stringify(game)); // reload the current window window.location.reload();