I'm stupid.

This commit is contained in:
Robert Kolner committed 2012-03-15 16:36:46 +01:00
1 parent a498395b7f
commit aaec2f9f43
1 file changed
+8 -5
+8 -5
View File
@@ -39,9 +39,12 @@ function TetrisGame(id) {
/**************/
/* Functions: */
/**************/
this.drawLock = false;
this.drawLocked = false;
this.drawLock = function() { this.drawLocked = true; };
this.drawUnlock = function() { this.drawLocked = false; };
this.redraw = function() {
if (this.drawLock) return;
if (this.drawLocked) return;
this.canvas.drawBoard(this.board);
this.drawCurrentBrick();
@@ -217,12 +220,12 @@ function TetrisGame(id) {
/* Fill out */
this.moveCurrentBrickDown();
this.drawLock = true;
this.drawLock();
var filledLines = this.getFilledLines();
for (var i = 0; i < filledLines.length; i++) {
this.removeLine(filledLines[i]);
this.removeLine(filledLines[i]-1);
}
this.drawLock = false;
this.drawUnlock();
this.redraw();
if (this.isGameLost) {