Anonymous user
Tetris/Java: Difference between revisions
m
→Code: remove dead code
m (add collection template) |
m (→Code: remove dead code) |
||
Line 75:
case KeyEvent.VK_LEFT:
if (canMove(fallingShape, Dir.left))
move(
break;
case KeyEvent.VK_RIGHT:
if (canMove(fallingShape, Dir.right))
move(
break;
Line 87:
fastDown = true;
while (canMove(fallingShape, Dir.down)) {
move(
repaint();
}
Line 152:
if (!scoreboard.isGameOver()) {
if (canMove(fallingShape, Dir.down)) {
move(
} else {
shapeHasLanded();
Line 291:
}
void move(
fallingShapeRow += dir.y;
fallingShapeCol += dir.x;
|