Skip to content

Commit 971e7de

Browse files
committed
fixed the NaN bug when r was pressed straight away : set the default to 40 and removed unnecessary code for alternative line limits as only game type is sprint
1 parent 42f45c0 commit 971e7de

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tetris.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,8 @@ function init(gt) {
388388
replayKeys.seed = ~~(Math.random() * 2147483645) + 1;
389389
gametype = gt;
390390
}
391-
if (gametype === 0) {
392-
lineLimit = 40;
393-
} else if (gametype === 1) {
394-
lineLimit = 150;
395-
}
391+
392+
lineLimit = 40;
396393

397394
//Reset
398395
keysDown = 0;

0 commit comments

Comments
 (0)