summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
index b1f427c..79ff0c1 100755
--- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -127,7 +127,7 @@ function shuffleDown() {
} else {
if (fallDist > 0) {
var obj = board[index(column, row)];
- obj.y += fallDist * gameCanvas.blockSize;
+ obj.y = (row + fallDist) * gameCanvas.blockSize;
board[index(column, row + fallDist)] = obj;
board[index(column, row)] = null;
}
@@ -145,7 +145,7 @@ function shuffleDown() {
obj = board[index(column, row)];
if (obj == null)
continue;
- obj.x -= fallDist * gameCanvas.blockSize;
+ obj.x = (fallDist - column) * gameCanvas.blockSize;
board[index(column - fallDist, row)] = obj;
board[index(column, row)] = null;
}