/[emacs]/emacs/lisp/play/5x5.el
ViewVC logotype

Diff of /emacs/lisp/play/5x5.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by pj, Tue Dec 11 07:29:21 2001 UTC revision 1.8.4.1 by miles, Fri Apr 4 06:20:31 2003 UTC
# Line 146  Line 146 
146      (define-key map [(control c) (control r)] #'5x5-crack-randomly)      (define-key map [(control c) (control r)] #'5x5-crack-randomly)
147      (define-key map [(control c) (control c)] #'5x5-crack-mutating-current)      (define-key map [(control c) (control c)] #'5x5-crack-mutating-current)
148      (define-key map [(control c) (control b)] #'5x5-crack-mutating-best)      (define-key map [(control c) (control b)] #'5x5-crack-mutating-best)
149      (define-key map [(control c) (control x)] #'5x5-crack-xor-mutate)        (define-key map [(control c) (control x)] #'5x5-crack-xor-mutate)
150      (define-key map "n"                       #'5x5-new-game)      (define-key map "n"                       #'5x5-new-game)
151      (define-key map "q"                       #'5x5-quit-game)      (define-key map "q"                       #'5x5-quit-game)
152      (setq 5x5-mode-map map)))      (setq 5x5-mode-map map)))
# Line 178  The key bindings for 5x5-mode are: Line 178  The key bindings for 5x5-mode are:
178    (use-local-map 5x5-mode-map)    (use-local-map 5x5-mode-map)
179    (setq major-mode '5x5-mode    (setq major-mode '5x5-mode
180          mode-name  "5x5")          mode-name  "5x5")
181    (run-hooks '5x5-mode-hook)      (run-hooks '5x5-mode-hook)
182    (setq buffer-read-only t    (setq buffer-read-only t
183          truncate-lines   t)          truncate-lines   t)
184    (buffer-disable-undo (current-buffer)))    (buffer-disable-undo (current-buffer)))
# Line 192  squares you must fill the grid. Line 192  squares you must fill the grid.
192    
193  5x5 keyboard bindings are:  5x5 keyboard bindings are:
194  \\<5x5-mode-map>  \\<5x5-mode-map>
195  Flip                      \\[5x5-flip-current]  Flip                      \\[5x5-flip-current]
196  Move up                   \\[5x5-up]            Move up                   \\[5x5-up]
197  Move down                 \\[5x5-down]          Move down                 \\[5x5-down]
198  Move left                 \\[5x5-left]          Move left                 \\[5x5-left]
199  Move right                \\[5x5-right]          Move right                \\[5x5-right]
200  Start new game            \\[5x5-new-game]  Start new game            \\[5x5-new-game]
201  New game with random grid \\[5x5-randomize]  New game with random grid \\[5x5-randomize]
202  Random cracker            \\[5x5-crack-randomly]  Random cracker            \\[5x5-crack-randomly]
# Line 426  progress because it is an animated attem Line 426  progress because it is an animated attem
426                  (5x5-position-cursor)                  (5x5-position-cursor)
427                  (sit-for 5x5-animate-delay))))                  (sit-for 5x5-animate-delay))))
428    5x5-grid)    5x5-grid)
429      
430  ;; Keyboard response functions.  ;; Keyboard response functions.
431    
432  (defun 5x5-flip-current ()  (defun 5x5-flip-current ()
# Line 512  progress because it is an animated attem Line 512  progress because it is an animated attem
512  (defun 5x5-xor (x y)  (defun 5x5-xor (x y)
513    "Boolean exclusive-or of X and Y."    "Boolean exclusive-or of X and Y."
514    (and (or x y) (not (and x y))))    (and (or x y) (not (and x y))))
515                      
516  (defun 5x5-y-or-n-p (prompt)  (defun 5x5-y-or-n-p (prompt)
517    "5x5 wrapper for y-or-n-p which respects the 5x5-hassle-me setting."    "5x5 wrapper for y-or-n-p which respects the 5x5-hassle-me setting."
518    (if 5x5-hassle-me    (if 5x5-hassle-me

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.8.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26