Anonymous user
Tetris/JavaScript: Difference between revisions
m
→Code: remove dead code
m (→Code: small changes) |
m (→Code: remove dead code) |
||
Line 6:
<lang javascript><!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
Line 19 ⟶ 20:
</style>
</head>
<body>
<canvas></canvas>
Line 98 ⟶ 100:
case 'ArrowLeft':
if (canMove(fallingShape, left))
move(
break;
Line 104 ⟶ 106:
case 'ArrowRight':
if (canMove(fallingShape, right))
move(
break;
Line 112 ⟶ 114:
fastDown = true;
while (canMove(fallingShape, down)) {
move(
draw();
}
Line 164 ⟶ 166:
}
function move(
fallingShapeRow += dir.y;
fallingShapeCol += dir.x;
Line 469 ⟶ 471:
if (canMove(fallingShape, down)) {
move(
} else {
shapeHasLanded();
Line 515 ⟶ 517:
</body>
</html></lang>
|