From 6d46680925023c7a51e96aebaf3ff1d86ccc2d71 Mon Sep 17 00:00:00 2001 From: Robert Kolner Date: Thu, 15 Mar 2012 16:37:55 +0100 Subject: [PATCH] Removed unnecessary code. --- tetris.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tetris.js b/tetris.js index 5303635..426be7a 100644 --- a/tetris.js +++ b/tetris.js @@ -39,13 +39,7 @@ function TetrisGame(id) { /**************/ /* Functions: */ /**************/ - this.drawLocked = false; - this.drawLock = function() { this.drawLocked = true; }; - this.drawUnlock = function() { this.drawLocked = false; }; - this.redraw = function() { - if (this.drawLocked) return; - this.canvas.drawBoard(this.board); this.drawCurrentBrick(); } @@ -217,15 +211,12 @@ function TetrisGame(id) { } this.doTurn = function() { - /* Fill out */ this.moveCurrentBrickDown(); - this.drawLock(); var filledLines = this.getFilledLines(); for (var i = 0; i < filledLines.length; i++) { this.removeLine(filledLines[i]-1); } - this.drawUnlock(); this.redraw(); if (this.isGameLost) {