(define-key map [left] 'tetris-move-left)
(define-key map [right] 'tetris-move-right)
(define-key map [up] 'tetris-rotate-prev)
- (define-key map [down] 'tetris-rotate-next)
+ (define-key map [down] 'tetris-move-down)
map))
(defvar tetris-null-map
(setq tetris-pos-x (1- tetris-pos-x)))
(tetris-draw-shape)))
+(defun tetris-move-down ()
+ "Move the shape one square to the bottom."
+ (interactive)
+ (unless tetris-paused
+ (tetris-erase-shape)
+ (setq tetris-pos-y (1+ tetris-pos-y))
+ (if (tetris-test-shape)
+ (setq tetris-pos-y (1- tetris-pos-y)))
+ (tetris-draw-shape)))
+
(defun tetris-rotate-prev ()
"Rotate the shape clockwise."
(interactive)