From 5dc99c2de83860c39abe56f4ad5d445508a25dd3 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 14 Oct 2010 10:08:57 +1000 Subject: Fix samegame tutorial js Turns out that subtraction is not commutative. Who knew? Task-number: QTBUG-13532 --- examples/declarative/tutorials/samegame/samegame4/content/samegame.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js index 79ff0c1..ccc3f9d 100755 --- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js +++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js @@ -145,7 +145,7 @@ function shuffleDown() { obj = board[index(column, row)]; if (obj == null) continue; - obj.x = (fallDist - column) * gameCanvas.blockSize; + obj.x = (column - fallDist) * gameCanvas.blockSize; board[index(column - fallDist, row)] = obj; board[index(column, row)] = null; } -- cgit v0.12