diff -r ef0373b55136 -r 758a864f9613 demos/declarative/snake/content/snake.js --- a/demos/declarative/snake/content/snake.js Fri Sep 17 08:34:18 2010 +0300 +++ b/demos/declarative/snake/content/snake.js Mon Oct 04 01:19:32 2010 +0300 @@ -35,9 +35,12 @@ if (heartbeat.running) { endGame(); startNewGameTimer.running = true; + state = ""; return; } + state = "starting"; + numRows = numRowsAvailable; numColumns = numColumnsAvailable; board = new Array(numRows * numColumns); @@ -80,7 +83,6 @@ waitForCookie = 5; score = 0; startHeartbeatTimer.running = true; - heartbeat.running = true; } function endGame() @@ -94,6 +96,7 @@ } lastScore = score; highScores.saveScore(lastScore); + state = ""; } function move() {