From e61ef188242658ae97da139571e87195f69f2543 Mon Sep 17 00:00:00 2001 From: Laurent Margirier Date: Wed, 12 Mar 2014 12:27:27 +0100 Subject: [PATCH 01/13] Endless Game. Allow user to continue the game. - main.css isn't compiled - a special class `.tile-gold` is added to tiles above 2048 --- index.html | 1 + js/game_manager.js | 23 +++++++++++++++++++++-- js/html_actuator.js | 29 +++++++++++++++++++++++------ js/keyboard_input_manager.js | 10 +++++++++- style/main.scss | 8 ++++++++ 5 files changed, 62 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index c61559c..638fec8 100644 --- a/index.html +++ b/index.html @@ -26,6 +26,7 @@

diff --git a/js/game_manager.js b/js/game_manager.js index 01ce04c..95f75e5 100644 --- a/js/game_manager.js +++ b/js/game_manager.js @@ -8,6 +8,7 @@ function GameManager(size, InputManager, Actuator, ScoreManager) { this.inputManager.on("move", this.move.bind(this)); this.inputManager.on("restart", this.restart.bind(this)); + this.inputManager.on("keepPlaying", this.keepPlaying.bind(this)); this.setup(); } @@ -18,6 +19,22 @@ GameManager.prototype.restart = function () { this.setup(); }; +// Keep playing after winning +GameManager.prototype.keepPlaying = function () { + this.keepPlaying = true; + this.actuator.keepPlaying(); +}; + +GameManager.prototype.isGameOver = function() { + if (this.over || (this.won && !this.keepPlaying) ) { + return true; + } + else { + return false; + } +} + + // Set up the game GameManager.prototype.setup = function () { this.grid = new Grid(this.size); @@ -25,6 +42,7 @@ GameManager.prototype.setup = function () { this.score = 0; this.over = false; this.won = false; + this.keepPlaying = false; // Add the initial tiles this.addStartTiles(); @@ -60,7 +78,8 @@ GameManager.prototype.actuate = function () { score: this.score, over: this.over, won: this.won, - bestScore: this.scoreManager.get() + bestScore: this.scoreManager.get(), + gameOver: this.isGameOver() }); }; @@ -87,7 +106,7 @@ GameManager.prototype.move = function (direction) { // 0: up, 1: right, 2:down, 3: left var self = this; - if (this.over || this.won) return; // Don't do anything if the game's over + if (this.isGameOver()) return; // Don't do anything if the game's over var cell, tile; diff --git a/js/html_actuator.js b/js/html_actuator.js index 5562ce9..2ca979e 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -24,8 +24,11 @@ HTMLActuator.prototype.actuate = function (grid, metadata) { self.updateScore(metadata.score); self.updateBestScore(metadata.bestScore); - if (metadata.over) self.message(false); // You lose - if (metadata.won) self.message(true); // You win! + if (metadata.gameOver) { + if (metadata.over) self.message(false); // You lose + else if (metadata.won) self.message(true); // You win! + } + }); }; @@ -33,6 +36,10 @@ HTMLActuator.prototype.restart = function () { this.clearMessage(); }; +HTMLActuator.prototype.keepPlaying = function () { + this.clearMessage(); +} + HTMLActuator.prototype.clearContainer = function (container) { while (container.firstChild) { container.removeChild(container.firstChild); @@ -42,12 +49,13 @@ HTMLActuator.prototype.clearContainer = function (container) { HTMLActuator.prototype.addTile = function (tile) { var self = this; - var element = document.createElement("div"); - var position = tile.previousPosition || { x: tile.x, y: tile.y }; - positionClass = this.positionClass(position); + var element = document.createElement("div"); + var position = tile.previousPosition || { x: tile.x, y: tile.y }; + var positionClass = this.positionClass(position); + var styleClass = this.styleClass(tile); // We can't use classlist because it somehow glitches when replacing classes - var classes = ["tile", "tile-" + tile.value, positionClass]; + var classes = ["tile", styleClass, positionClass]; this.applyClasses(element, classes); element.textContent = tile.value; @@ -88,6 +96,15 @@ HTMLActuator.prototype.positionClass = function (position) { return "tile-position-" + position.x + "-" + position.y; }; +HTMLActuator.prototype.styleClass = function (tile) { + var className = 'tile-'+tile.value; + + if (tile.value > 2048 ) { + className = className+' tile-gold'; + } + return className; +}; + HTMLActuator.prototype.updateScore = function (score) { this.clearContainer(this.scoreContainer); diff --git a/js/keyboard_input_manager.js b/js/keyboard_input_manager.js index 24dde7a..431b4a5 100644 --- a/js/keyboard_input_manager.js +++ b/js/keyboard_input_manager.js @@ -53,9 +53,12 @@ KeyboardInputManager.prototype.listen = function () { } }); - var retry = document.getElementsByClassName("retry-button")[0]; + var retry = document.querySelector(".retry-button"); retry.addEventListener("click", this.restart.bind(this)); + var keepPlaying = document.querySelector(".keep-playing-button"); + keepPlaying.addEventListener("click", this.keepPlaying.bind(this)); + // Listen to swipe events var touchStartClientX, touchStartClientY; var gameContainer = document.getElementsByClassName("game-container")[0]; @@ -92,3 +95,8 @@ KeyboardInputManager.prototype.restart = function (event) { event.preventDefault(); this.emit("restart"); }; + +KeyboardInputManager.prototype.keepPlaying = function (event) { + event.preventDefault(); + this.emit("keepPlaying"); +}; diff --git a/style/main.scss b/style/main.scss index b5e2609..f6660d0 100644 --- a/style/main.scss +++ b/style/main.scss @@ -218,6 +218,10 @@ hr { @include button; margin-left: 9px; // margin-top: 59px; + + &.keep-playing-button { + display: none; + } } @include animation(fade-in 800ms ease $transition-speed * 12); @@ -226,6 +230,10 @@ hr { &.game-won { background: rgba($tile-gold-color, .5); color: $bright-text-color; + + a.keep-playing-button { + display: inline-block; + } } &.game-won, &.game-over { From 7b4c2c171fd9b4dbc52d8c53f6db8fe12c4e7eca Mon Sep 17 00:00:00 2001 From: Laurent Margirier Date: Wed, 12 Mar 2014 13:37:08 +0100 Subject: [PATCH 02/13] compile main.css --- style/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/style/main.css b/style/main.css index c28f9be..46ece19 100644 --- a/style/main.css +++ b/style/main.css @@ -189,9 +189,13 @@ hr { height: 40px; line-height: 42px; margin-left: 9px; } + .game-container .game-message a.keep-playing-button { + display: none; } .game-container .game-message.game-won { background: rgba(237, 194, 46, 0.5); color: #f9f6f2; } + .game-container .game-message.game-won a.keep-playing-button { + display: inline-block; } .game-container .game-message.game-won, .game-container .game-message.game-over { display: block; } From 9626e2b060485b69d944a70ad670e251ba014aa4 Mon Sep 17 00:00:00 2001 From: Laurent Margirier Date: Wed, 12 Mar 2014 12:27:27 +0100 Subject: [PATCH 03/13] Endless Game. Allow user to continue the game. - main.css isn't compiled - a special class `.tile-gold` is added to tiles above 2048 --- index.html | 1 + js/game_manager.js | 23 +++++++++++++++++++++-- js/html_actuator.js | 29 +++++++++++++++++++++++------ js/keyboard_input_manager.js | 10 +++++++++- style/main.scss | 8 ++++++++ 5 files changed, 62 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 5046905..206c639 100644 --- a/index.html +++ b/index.html @@ -28,6 +28,7 @@ diff --git a/js/game_manager.js b/js/game_manager.js index 01ce04c..95f75e5 100644 --- a/js/game_manager.js +++ b/js/game_manager.js @@ -8,6 +8,7 @@ function GameManager(size, InputManager, Actuator, ScoreManager) { this.inputManager.on("move", this.move.bind(this)); this.inputManager.on("restart", this.restart.bind(this)); + this.inputManager.on("keepPlaying", this.keepPlaying.bind(this)); this.setup(); } @@ -18,6 +19,22 @@ GameManager.prototype.restart = function () { this.setup(); }; +// Keep playing after winning +GameManager.prototype.keepPlaying = function () { + this.keepPlaying = true; + this.actuator.keepPlaying(); +}; + +GameManager.prototype.isGameOver = function() { + if (this.over || (this.won && !this.keepPlaying) ) { + return true; + } + else { + return false; + } +} + + // Set up the game GameManager.prototype.setup = function () { this.grid = new Grid(this.size); @@ -25,6 +42,7 @@ GameManager.prototype.setup = function () { this.score = 0; this.over = false; this.won = false; + this.keepPlaying = false; // Add the initial tiles this.addStartTiles(); @@ -60,7 +78,8 @@ GameManager.prototype.actuate = function () { score: this.score, over: this.over, won: this.won, - bestScore: this.scoreManager.get() + bestScore: this.scoreManager.get(), + gameOver: this.isGameOver() }); }; @@ -87,7 +106,7 @@ GameManager.prototype.move = function (direction) { // 0: up, 1: right, 2:down, 3: left var self = this; - if (this.over || this.won) return; // Don't do anything if the game's over + if (this.isGameOver()) return; // Don't do anything if the game's over var cell, tile; diff --git a/js/html_actuator.js b/js/html_actuator.js index 04a137b..38d16eb 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -24,8 +24,11 @@ HTMLActuator.prototype.actuate = function (grid, metadata) { self.updateScore(metadata.score); self.updateBestScore(metadata.bestScore); - if (metadata.over) self.message(false); // You lose - if (metadata.won) self.message(true); // You win! + if (metadata.gameOver) { + if (metadata.over) self.message(false); // You lose + else if (metadata.won) self.message(true); // You win! + } + }); }; @@ -33,6 +36,10 @@ HTMLActuator.prototype.restart = function () { this.clearMessage(); }; +HTMLActuator.prototype.keepPlaying = function () { + this.clearMessage(); +} + HTMLActuator.prototype.clearContainer = function (container) { while (container.firstChild) { container.removeChild(container.firstChild); @@ -42,12 +49,13 @@ HTMLActuator.prototype.clearContainer = function (container) { HTMLActuator.prototype.addTile = function (tile) { var self = this; - var element = document.createElement("div"); - var position = tile.previousPosition || { x: tile.x, y: tile.y }; - positionClass = this.positionClass(position); + var element = document.createElement("div"); + var position = tile.previousPosition || { x: tile.x, y: tile.y }; + var positionClass = this.positionClass(position); + var styleClass = this.styleClass(tile); // We can't use classlist because it somehow glitches when replacing classes - var classes = ["tile", "tile-" + tile.value, positionClass]; + var classes = ["tile", styleClass, positionClass]; this.applyClasses(element, classes); element.textContent = tile.value; @@ -88,6 +96,15 @@ HTMLActuator.prototype.positionClass = function (position) { return "tile-position-" + position.x + "-" + position.y; }; +HTMLActuator.prototype.styleClass = function (tile) { + var className = 'tile-'+tile.value; + + if (tile.value > 2048 ) { + className = className+' tile-gold'; + } + return className; +}; + HTMLActuator.prototype.updateScore = function (score) { this.clearContainer(this.scoreContainer); diff --git a/js/keyboard_input_manager.js b/js/keyboard_input_manager.js index b85c8c2..84d830b 100644 --- a/js/keyboard_input_manager.js +++ b/js/keyboard_input_manager.js @@ -53,10 +53,13 @@ KeyboardInputManager.prototype.listen = function () { } }); - var retry = document.getElementsByClassName("retry-button")[0]; + var retry = document.querySelector(".retry-button"); retry.addEventListener("click", this.restart.bind(this)); retry.addEventListener("touchend", this.restart.bind(this)); + var keepPlaying = document.querySelector(".keep-playing-button"); + keepPlaying.addEventListener("click", this.keepPlaying.bind(this)); + // Listen to swipe events var touchStartClientX, touchStartClientY; var gameContainer = document.getElementsByClassName("game-container")[0]; @@ -93,3 +96,8 @@ KeyboardInputManager.prototype.restart = function (event) { event.preventDefault(); this.emit("restart"); }; + +KeyboardInputManager.prototype.keepPlaying = function (event) { + event.preventDefault(); + this.emit("keepPlaying"); +}; diff --git a/style/main.scss b/style/main.scss index b5e2609..f6660d0 100644 --- a/style/main.scss +++ b/style/main.scss @@ -218,6 +218,10 @@ hr { @include button; margin-left: 9px; // margin-top: 59px; + + &.keep-playing-button { + display: none; + } } @include animation(fade-in 800ms ease $transition-speed * 12); @@ -226,6 +230,10 @@ hr { &.game-won { background: rgba($tile-gold-color, .5); color: $bright-text-color; + + a.keep-playing-button { + display: inline-block; + } } &.game-won, &.game-over { From e7be14d65a173a19065784fa3de80d93384754d5 Mon Sep 17 00:00:00 2001 From: Laurent Margirier Date: Wed, 12 Mar 2014 13:37:08 +0100 Subject: [PATCH 04/13] compile main.css --- style/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/style/main.css b/style/main.css index c28f9be..6bb58d3 100644 --- a/style/main.css +++ b/style/main.css @@ -189,9 +189,13 @@ hr { height: 40px; line-height: 42px; margin-left: 9px; } + .game-container .game-message a.keep-playing-button { + display: none; } .game-container .game-message.game-won { background: rgba(237, 194, 46, 0.5); color: #f9f6f2; } + .game-container .game-message.game-won a.keep-playing-button { + display: inline-block; } .game-container .game-message.game-won, .game-container .game-message.game-over { display: block; } From bd62716d604fd30fe3e0ffa015161279afa47461 Mon Sep 17 00:00:00 2001 From: Laurent Margirier Date: Thu, 13 Mar 2014 10:17:57 +0100 Subject: [PATCH 05/13] add touchend event (see PR #32) --- js/keyboard_input_manager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/keyboard_input_manager.js b/js/keyboard_input_manager.js index 84d830b..822cc3b 100644 --- a/js/keyboard_input_manager.js +++ b/js/keyboard_input_manager.js @@ -59,6 +59,7 @@ KeyboardInputManager.prototype.listen = function () { var keepPlaying = document.querySelector(".keep-playing-button"); keepPlaying.addEventListener("click", this.keepPlaying.bind(this)); + keepPlaying.addEventListener("touchend", this.keepPlaying.bind(this)); // Listen to swipe events var touchStartClientX, touchStartClientY; From 9274840cede00b810bf45a92f7c6b128659cf98f Mon Sep 17 00:00:00 2001 From: codeKonami Date: Fri, 14 Mar 2014 14:25:26 +1300 Subject: [PATCH 06/13] adding a test to verify the localStorage is supported fixing a bug on private browsing on safari --- js/local_score_manager.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/js/local_score_manager.js b/js/local_score_manager.js index 2c94dd3..455dfbf 100644 --- a/js/local_score_manager.js +++ b/js/local_score_manager.js @@ -18,9 +18,21 @@ window.fakeStorage = { } }; -function LocalScoreManager() { - var localSupported = !!window.localStorage; +function isLocalStorageNameSupported() +{ + var testKey = 'test', storage = window.localStorage; + try { + storage.setItem(testKey, '1'); + storage.removeItem(testKey); + return true; + } + catch (error) { + return false; + } +} +function LocalScoreManager() { + var localSupported = isLocalStorageNameSupported(); this.key = "bestScore"; this.storage = localSupported ? window.localStorage : window.fakeStorage; } From 2bf48efe6845d55896f0a6650562d9c1273e8103 Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Fri, 14 Mar 2014 12:33:32 +0100 Subject: [PATCH 07/13] change local storage support check --- js/local_score_manager.js | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/js/local_score_manager.js b/js/local_score_manager.js index 455dfbf..1d3d492 100644 --- a/js/local_score_manager.js +++ b/js/local_score_manager.js @@ -18,24 +18,26 @@ window.fakeStorage = { } }; -function isLocalStorageNameSupported() -{ - var testKey = 'test', storage = window.localStorage; - try { - storage.setItem(testKey, '1'); - storage.removeItem(testKey); - return true; - } - catch (error) { - return false; - } +function LocalScoreManager() { + this.key = "bestScore"; + + var supported = this.localStorageSupported(); + console.log(supported); + this.storage = supported ? window.localStorage : window.fakeStorage; } -function LocalScoreManager() { - var localSupported = isLocalStorageNameSupported(); - this.key = "bestScore"; - this.storage = localSupported ? window.localStorage : window.fakeStorage; -} +LocalScoreManager.prototype.localStorageSupported = function () { + var testKey = "test"; + var storage = window.localStorage; + + try { + storage.setItem(testKey, "1"); + storage.removeItem(testKey); + return true; + } catch (error) { + return false; + } +}; LocalScoreManager.prototype.get = function () { return this.storage.getItem(this.key) || 0; From cfbf74905fa44e72a39d50701f96b614660ba445 Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Fri, 14 Mar 2014 13:27:57 +0100 Subject: [PATCH 08/13] refactor code --- index.html | 2 +- js/game_manager.js | 14 ++++++-------- js/html_actuator.js | 7 ++----- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 575c62a..25f49c9 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@ diff --git a/js/game_manager.js b/js/game_manager.js index 95f75e5..8161f8e 100644 --- a/js/game_manager.js +++ b/js/game_manager.js @@ -15,25 +15,23 @@ function GameManager(size, InputManager, Actuator, ScoreManager) { // Restart the game GameManager.prototype.restart = function () { - this.actuator.restart(); + this.actuator.continue(); this.setup(); }; // Keep playing after winning GameManager.prototype.keepPlaying = function () { this.keepPlaying = true; - this.actuator.keepPlaying(); + this.actuator.continue(); }; -GameManager.prototype.isGameOver = function() { - if (this.over || (this.won && !this.keepPlaying) ) { +GameManager.prototype.isGameOver = function () { + if (this.over || (this.won && !this.keepPlaying)) { return true; - } - else { + } else { return false; } -} - +}; // Set up the game GameManager.prototype.setup = function () { diff --git a/js/html_actuator.js b/js/html_actuator.js index adfff59..25394ac 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -32,11 +32,8 @@ HTMLActuator.prototype.actuate = function (grid, metadata) { }); }; -HTMLActuator.prototype.restart = function () { - this.clearMessage(); -}; - -HTMLActuator.prototype.keepPlaying = function () { +// Continues the game (both restart and keep playing) +HTMLActuator.prototype.continue = function () { this.clearMessage(); }; From 5392893cd6f6f2e2fe461481729d18b870c311e3 Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Fri, 14 Mar 2014 13:34:05 +0100 Subject: [PATCH 09/13] rename GameOver to GameTerminated to avoid ambiguity --- js/game_manager.js | 24 ++++++++++++------------ js/html_actuator.js | 9 ++++++--- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/js/game_manager.js b/js/game_manager.js index 8161f8e..b36aea3 100644 --- a/js/game_manager.js +++ b/js/game_manager.js @@ -25,7 +25,7 @@ GameManager.prototype.keepPlaying = function () { this.actuator.continue(); }; -GameManager.prototype.isGameOver = function () { +GameManager.prototype.isGameTerminated = function () { if (this.over || (this.won && !this.keepPlaying)) { return true; } else { @@ -35,12 +35,12 @@ GameManager.prototype.isGameOver = function () { // Set up the game GameManager.prototype.setup = function () { - this.grid = new Grid(this.size); + this.grid = new Grid(this.size); - this.score = 0; - this.over = false; - this.won = false; - this.keepPlaying = false; + this.score = 0; + this.over = false; + this.won = false; + this.keepPlaying = false; // Add the initial tiles this.addStartTiles(); @@ -73,11 +73,11 @@ GameManager.prototype.actuate = function () { } this.actuator.actuate(this.grid, { - score: this.score, - over: this.over, - won: this.won, - bestScore: this.scoreManager.get(), - gameOver: this.isGameOver() + score: this.score, + over: this.over, + won: this.won, + bestScore: this.scoreManager.get(), + terminated: this.isGameTerminated() }); }; @@ -104,7 +104,7 @@ GameManager.prototype.move = function (direction) { // 0: up, 1: right, 2:down, 3: left var self = this; - if (this.isGameOver()) return; // Don't do anything if the game's over + if (this.isGameTerminated()) return; // Don't do anything if the game's over var cell, tile; diff --git a/js/html_actuator.js b/js/html_actuator.js index 25394ac..08eea75 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -24,9 +24,12 @@ HTMLActuator.prototype.actuate = function (grid, metadata) { self.updateScore(metadata.score); self.updateBestScore(metadata.bestScore); - if (metadata.gameOver) { - if (metadata.over) self.message(false); // You lose - else if (metadata.won) self.message(true); // You win! + if (metadata.terminated) { + if (metadata.over) { + self.message(false); // You lose + } else if (metadata.won) { + self.message(true); // You win! + } } }); From 10c72a76b3c8e2aa496cdf1400b305d1ae960dba Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Fri, 14 Mar 2014 13:35:42 +0100 Subject: [PATCH 10/13] rename tile-gold to tile-super --- js/html_actuator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/html_actuator.js b/js/html_actuator.js index 08eea75..d840068 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -57,7 +57,7 @@ HTMLActuator.prototype.addTile = function (tile) { // We can't use classlist because it somehow glitches when replacing classes var classes = ["tile", "tile-" + tile.value, positionClass]; - if (tile.value > 2048) classes.push("tile-gold"); + if (tile.value > 2048) classes.push("tile-super"); this.applyClasses(wrapper, classes); From f663e17a4b70dbc1b89ca9757094ccdf6019e068 Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Fri, 14 Mar 2014 13:50:49 +0100 Subject: [PATCH 11/13] add styling for super tiles --- style/main.css | 11 +++++++++++ style/main.scss | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/style/main.css b/style/main.css index 4cc76be..ad5b371 100644 --- a/style/main.css +++ b/style/main.css @@ -372,6 +372,13 @@ hr { @media screen and (max-width: 480px) { .tile.tile-2048 .tile-inner { font-size: 15px; } } + .tile.tile-super .tile-inner { + color: #f9f6f2; + background: #3c3a32; + font-size: 30px; } + @media screen and (max-width: 480px) { + .tile.tile-super .tile-inner { + font-size: 10px; } } @-webkit-keyframes appear { 0% { @@ -557,9 +564,13 @@ hr { height: 40px; line-height: 42px; margin-left: 9px; } + .game-container .game-message a.keep-playing-button { + display: none; } .game-container .game-message.game-won { background: rgba(237, 194, 46, 0.5); color: #f9f6f2; } + .game-container .game-message.game-won a.keep-playing-button { + display: inline-block; } .game-container .game-message.game-won, .game-container .game-message.game-over { display: block; } diff --git a/style/main.scss b/style/main.scss index 1cde43f..307a56f 100644 --- a/style/main.scss +++ b/style/main.scss @@ -393,6 +393,18 @@ hr { $exponent: $exponent + 1; } + + // Super tiles (above 2048) + &.tile-super .tile-inner { + color: $bright-text-color; + background: mix(#333, $tile-gold-color, 95%); + + font-size: 30px; + + @include smaller(480px) { + font-size: 10px; + } + } } @include keyframes(appear) { From db0dc7eae1af7a4bccd186c5933ae019635b3bc1 Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Fri, 14 Mar 2014 13:50:57 +0100 Subject: [PATCH 12/13] rename keep playing to keep going --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 25f49c9..cbcfe65 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@ From f732d4f54713ec716d96754e1301bdf7fe6f1ef3 Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Fri, 14 Mar 2014 13:56:38 +0100 Subject: [PATCH 13/13] remove debug logging --- js/local_score_manager.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/local_score_manager.js b/js/local_score_manager.js index 1d3d492..ec4575d 100644 --- a/js/local_score_manager.js +++ b/js/local_score_manager.js @@ -22,7 +22,6 @@ function LocalScoreManager() { this.key = "bestScore"; var supported = this.localStorageSupported(); - console.log(supported); this.storage = supported ? window.localStorage : window.fakeStorage; }