Merge branch 'master' into robertko

This commit is contained in:
Robert Kolner committed 2012-11-21 18:36:24 +01:00
commit 143a7e9cdd
1 file changed
+7 -1
+7 -1
View File
@@ -221,7 +221,10 @@ function TetrisGame(canvasId, linesCounterId, nextBricksCanvasId) {
}
this.integrateCurrentIntoBoard = function () {
if (this.currentBrickId == 0) {
return true;
}
var shape = this.brickShape(this.currentBrickId, this.currentBrickRot);
for (var i = 0; i < 4; i++) {
var x = this.currentBrickLoc[0]+shape[i][0];
@@ -233,6 +236,9 @@ function TetrisGame(canvasId, linesCounterId, nextBricksCanvasId) {
}
this.board[x][y] = this.bricks[this.currentBrickId];
this.currentBrickId = 0;
this.currentBrickLoc = 0;
this.currentBrickRot = 0;
}
}