summaryrefslogtreecommitdiff
path: root/lisp/play
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/play')
-rw-r--r--lisp/play/tetris.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el
index 586d1d5d462..0f3b7586153 100644
--- a/lisp/play/tetris.el
+++ b/lisp/play/tetris.el
@@ -265,7 +265,7 @@ each one of its four blocks.")
(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
@@ -524,6 +524,16 @@ Drops the shape one square, testing for collision."
(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)