From: Francesco Potortì Date: Fri, 13 Sep 2002 13:33:10 +0000 (+0000) Subject: (tetris-blank-options, tetris-cell-options): X-Git-Tag: emacs-pretest-21.2.91~32 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b01b828f1e6b2961947f798fd944e37724b93ef7;p=emacs.git (tetris-blank-options, tetris-cell-options): Remove various redundant `(t nil)'. (tetris-border-options): Use color on tty if available. --- diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el index 37b544f1976..01ba343aa4f 100644 --- a/lisp/play/tetris.el +++ b/lisp/play/tetris.el @@ -109,25 +109,14 @@ Element 0 is ignored.") ;; ;;;;;;;;;;;;; display options ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defvar tetris-border-options - '(((glyph colorize) - (t ?\+)) - ((color-x color-x) - (mono-x grid-x) - (t nil)) - (((glyph color-x) [0.5 0.5 0.5]) - (t nil)))) - (defvar tetris-blank-options '(((glyph colorize) (t ?\040)) ((color-x color-x) (mono-x grid-x) - (color-tty color-tty) - (t nil)) + (color-tty color-tty)) (((glyph color-x) [0 0 0]) - (color-tty "black") - (t nil)))) + (color-tty "black")))) (defvar tetris-cell-options '(((glyph colorize) @@ -136,11 +125,19 @@ Element 0 is ignored.") ((color-x color-x) (mono-x mono-x) (color-tty color-tty) - (mono-tty mono-tty) - (t nil)) + (mono-tty mono-tty)) ;; color information is taken from tetris-x-colors and tetris-tty-colors )) +(defvar tetris-border-options + '(((glyph colorize) + (t ?\+)) + ((color-x color-x) + (mono-x grid-x) + (color-tty color-tty)) + (((glyph color-x) [0.5 0.5 0.5]) + (color-tty "white")))) + (defvar tetris-space-options '(((t ?\040)) nil @@ -184,10 +181,10 @@ Element 0 is ignored.") [[0 0 0 0] [7 0 0 0] [0 0 0 0] [7 0 0 0]] [[0 0 0 0] [7 0 0 0] [0 0 0 0] [7 0 0 0]]]]) -;;the scoring rules were taken from "xtetris". Blocks score differently +;;the scoring rules were taken from "xtetris". Blocks score differently ;;depending on their rotation -(defconst tetris-shape-scores +(defconst tetris-shape-scores [ [6 6 6 6] [6 7 6 7] [6 7 6 7] [6 7 6 7] [6 7 6 7] [5 5 6 5] [5 8 5 8]] ) (defconst tetris-shape-dimensions @@ -440,7 +437,7 @@ Element 0 is ignored.") (tetris-shift-down) (setq tetris-n-shapes (1+ tetris-n-shapes)) (setq tetris-score - (+ tetris-score + (+ tetris-score (aref (aref tetris-shape-scores tetris-shape) tetris-rot))) (tetris-update-score) (tetris-new-shape))