[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/play/tetris.el,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/play/tetris.el,v |
Date: |
Sat, 03 Mar 2007 12:14:47 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 07/03/03 12:14:47
Index: tetris.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/play/tetris.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- tetris.el 28 Jan 2007 19:39:58 -0000 1.19
+++ tetris.el 3 Mar 2007 12:14:46 -0000 1.20
@@ -512,6 +512,7 @@
(defun tetris-move-bottom ()
"Drops the shape to the bottom of the playing area"
(interactive)
+ (if (not tetris-paused)
(let ((hit nil))
(tetris-erase-shape)
(while (not hit)
@@ -519,12 +520,13 @@
(setq hit (tetris-test-shape)))
(setq tetris-pos-y (1- tetris-pos-y))
(tetris-draw-shape)
- (tetris-shape-done)))
+ (tetris-shape-done))))
(defun tetris-move-left ()
"Moves the shape one square to the left"
(interactive)
- (unless (= tetris-pos-x 0)
+ (unless (or (= tetris-pos-x 0)
+ tetris-paused)
(tetris-erase-shape)
(setq tetris-pos-x (1- tetris-pos-x))
(if (tetris-test-shape)
@@ -534,8 +536,9 @@
(defun tetris-move-right ()
"Moves the shape one square to the right"
(interactive)
- (unless (= (+ tetris-pos-x (tetris-shape-width))
+ (unless (or (= (+ tetris-pos-x (tetris-shape-width))
tetris-width)
+ tetris-paused)
(tetris-erase-shape)
(setq tetris-pos-x (1+ tetris-pos-x))
(if (tetris-test-shape)
@@ -545,20 +548,23 @@
(defun tetris-rotate-prev ()
"Rotates the shape clockwise"
(interactive)
- (tetris-erase-shape)
+ (if (not tetris-paused)
+ (progn (tetris-erase-shape)
(setq tetris-rot (% (+ 1 tetris-rot) 4))
(if (tetris-test-shape)
(setq tetris-rot (% (+ 3 tetris-rot) 4)))
- (tetris-draw-shape))
+ (tetris-draw-shape))))
(defun tetris-rotate-next ()
"Rotates the shape anticlockwise"
(interactive)
+ (if (not tetris-paused)
+ (progn
(tetris-erase-shape)
(setq tetris-rot (% (+ 3 tetris-rot) 4))
(if (tetris-test-shape)
(setq tetris-rot (% (+ 1 tetris-rot) 4)))
- (tetris-draw-shape))
+ (tetris-draw-shape))))
(defun tetris-end-game ()
"Terminates the current game"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/play/tetris.el,v,
Eli Zaretskii <=