summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-10-14 00:08:57 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-10-14 00:08:57 (GMT)
commit5dc99c2de83860c39abe56f4ad5d445508a25dd3 (patch)
tree3c5b3b079da99474bbfe0f46339df94d6b551123 /examples
parentd2a8898e4d42fcf2c4cb51e9117690ae1616e350 (diff)
downloadQt-5dc99c2de83860c39abe56f4ad5d445508a25dd3.zip
Qt-5dc99c2de83860c39abe56f4ad5d445508a25dd3.tar.gz
Qt-5dc99c2de83860c39abe56f4ad5d445508a25dd3.tar.bz2
Fix samegame tutorial js
Turns out that subtraction is not commutative. Who knew? Task-number: QTBUG-13532
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js2
1 files changed, 1 insertions, 1 deletions
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;
}