Commit d6d545bf authored by Vasilij Schneidermann's avatar Vasilij Schneidermann Committed by Stefan Monnier
Browse files

* lisp/play/tetris.el (tetris-move-down): New command (bug#21360)

(tetris-mode-map): Use it.

Copyright-paperwork-exempt: yes
parent 48857075
......@@ -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)
(defvar tetris-null-map
......@@ -524,6 +524,16 @@ Drops the shape one square, testing for collision."
(setq tetris-pos-x (1- tetris-pos-x)))
(defun tetris-move-down ()
"Move the shape one square to the bottom."
(unless tetris-paused
(setq tetris-pos-y (1+ tetris-pos-y))
(if (tetris-test-shape)
(setq tetris-pos-y (1- tetris-pos-y)))
(defun tetris-rotate-prev ()
"Rotate the shape clockwise."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment