Skip to content

Instantly share code, notes, and snippets.

@anmonteiro
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save anmonteiro/9972045 to your computer and use it in GitHub Desktop.

Select an option

Save anmonteiro/9972045 to your computer and use it in GitHub Desktop.
Bookmarklet to start 2048 with a 2048 tile.
javascript:(function() {
localStorage.setItem('gameState',
"{\"grid\":{\"size\":4,\"cells\":[[null,{\"position\":{\"x\":0,\"y\":1},\"value\":2},null,{\"position\":{\"x\":0,\"y\":3},\"value\":4}],[null,null,null,{\"position\":{\"x\":1,\"y\":3},\"value\":4}],[null,{\"position\":{\"x\":2,\"y\":1},\"value\":2},{\"position\":{\"x\":2,\"y\":2},\"value\":16},{\"position\":{\"x\":2,\"y\":3},\"value\":8}],[null,{\"position\":{\"x\":3,\"y\":1},\"value\":4},{\"position\":{\"x\":3,\"y\":2},\"value\":8},{\"position\":{\"x\":3,\"y\":3},\"value\":2048}]]},\"score\":20232,\"over\":false,\"won\":true,\"keepPlaying\":true}");
window.location.reload();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment