diff -c /home/cwebber/elisp/tetris-old.el /home/cwebber/elisp/patch-tetris.el *** /home/cwebber/elisp/tetris-old.el 2007-02-27 17:28:45.000000000 -0600 --- /home/cwebber/elisp/patch-tetris.el 2007-02-27 17:29:12.000000000 -0600 *************** *** 512,530 **** (defun tetris-move-bottom () "Drops the shape to the bottom of the playing area" (interactive) ! (let ((hit nil)) ! (tetris-erase-shape) ! (while (not hit) ! (setq tetris-pos-y (1+ tetris-pos-y)) ! (setq hit (tetris-test-shape))) ! (setq tetris-pos-y (1- tetris-pos-y)) ! (tetris-draw-shape) ! (tetris-shape-done))) (defun tetris-move-left () "Moves the shape one square to the left" (interactive) ! (unless (= tetris-pos-x 0) (tetris-erase-shape) (setq tetris-pos-x (1- tetris-pos-x)) (if (tetris-test-shape) --- 512,532 ---- (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) ! (setq tetris-pos-y (1+ tetris-pos-y)) ! (setq hit (tetris-test-shape))) ! (setq tetris-pos-y (1- tetris-pos-y)) ! (tetris-draw-shape) ! (tetris-shape-done)))) (defun tetris-move-left () "Moves the shape one square to the left" (interactive) ! (unless (or (= tetris-pos-x 0) ! tetris-paused) (tetris-erase-shape) (setq tetris-pos-x (1- tetris-pos-x)) (if (tetris-test-shape) *************** *** 534,541 **** (defun tetris-move-right () "Moves the shape one square to the right" (interactive) ! (unless (= (+ tetris-pos-x (tetris-shape-width)) ! tetris-width) (tetris-erase-shape) (setq tetris-pos-x (1+ tetris-pos-x)) (if (tetris-test-shape) --- 536,544 ---- (defun tetris-move-right () "Moves the shape one square to the right" (interactive) ! (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,564 **** (defun tetris-rotate-prev () "Rotates the shape clockwise" (interactive) ! (tetris-erase-shape) ! (setq tetris-rot (% (+ 1 tetris-rot) 4)) ! (if (tetris-test-shape) ! (setq tetris-rot (% (+ 3 tetris-rot) 4))) ! (tetris-draw-shape)) (defun tetris-rotate-next () "Rotates the shape anticlockwise" (interactive) ! (tetris-erase-shape) ! (setq tetris-rot (% (+ 3 tetris-rot) 4)) ! (if (tetris-test-shape) ! (setq tetris-rot (% (+ 1 tetris-rot) 4))) ! (tetris-draw-shape)) (defun tetris-end-game () "Terminates the current game" --- 548,570 ---- (defun tetris-rotate-prev () "Rotates the shape clockwise" (interactive) ! (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)))) (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)))) (defun tetris-end-game () "Terminates the current game" Diff finished. Tue Feb 27 17:29:51 2007