Update engine.js

This commit is contained in:
Michael Townsend
2013-10-30 18:20:32 -04:00
parent de9f88dfab
commit f5847f66ba
+2 -2
View File
@@ -231,7 +231,7 @@ var Engine = {
Engine.saveGame(); Engine.saveGame();
var string64 = Base64.encode(localStorage.gameState); var string64 = Base64.encode(localStorage.gameState);
string64 = string64.replace(/\s/g, ''); string64 = string64.replace(/\s/g, '');
string64 = string64.replace(/\W/g, ''); string64 = string64.replace(/\./g, '');
string64 = string64.replace(/\n/g, ''); string64 = string64.replace(/\n/g, '');
prompt("save this.",string64); prompt("save this.",string64);
}, },
@@ -239,7 +239,7 @@ var Engine = {
import64: function() { import64: function() {
var string64 = prompt("put the save code here.",""); var string64 = prompt("put the save code here.","");
string64 = string64.replace(/\s/g, ''); string64 = string64.replace(/\s/g, '');
string64 = string64.replace(/\W/g, ''); string64 = string64.replace(/\./g, '');
string64 = string64.replace(/\n/g, ''); string64 = string64.replace(/\n/g, '');
var decodedSave = Base64.decode(string64); var decodedSave = Base64.decode(string64);
localStorage.gameState = decodedSave; localStorage.gameState = decodedSave;