Function: 5x5

5x5 is an autoloaded, interactive and byte-compiled function defined in 5x5.el.gz.

Signature

(5x5 &optional SIZE)

Documentation

Play 5x5.

The object of 5x5 is very simple, by moving around the grid and flipping squares you must fill the grid.

5x5 keyboard bindings are:
Flip SPC (5x5-flip-current)
Move up C-p (5x5-up)
Move down C-n (5x5-down)
Move left C-b (5x5-left)
Move right C-f (5x5-right)
Start new game n (5x5-new-game)
New game with random grid r (5x5-randomize)
Random cracker C-c C-r (5x5-crack-randomly)
Mutate current cracker C-c C-c (5x5-crack-mutating-current)
Mutate best cracker C-c C-b (5x5-crack-mutating-best)
Mutate xor cracker C-c C-x (5x5-crack-xor-mutate)
Solve with Calc s (5x5-solve-suggest)
Rotate left Calc Solutions < (5x5-solve-rotate-left)
Rotate right Calc Solutions > (5x5-solve-rotate-right)
Quit current game q (5x5-quit-game)

View in manual

Probably introduced at or before Emacs version 21.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/play/5x5.el.gz
;;;###autoload
(defun 5x5 (&optional size)
  "Play 5x5.

The object of 5x5 is very simple, by moving around the grid and flipping
squares you must fill the grid.

5x5 keyboard bindings are:
\\<5x5-mode-map>
Flip                        \\[5x5-flip-current]
Move up                     \\[5x5-up]
Move down                   \\[5x5-down]
Move left                   \\[5x5-left]
Move right                  \\[5x5-right]
Start new game              \\[5x5-new-game]
New game with random grid   \\[5x5-randomize]
Random cracker              \\[5x5-crack-randomly]
Mutate current cracker      \\[5x5-crack-mutating-current]
Mutate best cracker         \\[5x5-crack-mutating-best]
Mutate xor cracker          \\[5x5-crack-xor-mutate]
Solve with Calc             \\[5x5-solve-suggest]
Rotate left Calc Solutions  \\[5x5-solve-rotate-left]
Rotate right Calc Solutions \\[5x5-solve-rotate-right]
Quit current game           \\[5x5-quit-game]"

  (interactive "P")
  (setq 5x5-cracking nil)
  (switch-to-buffer 5x5-buffer-name)
  (5x5-mode)
  (when (natnump size)
      (setq 5x5-grid-size size))
  (if (or (not 5x5-grid) (not (= 5x5-grid-size (length (aref 5x5-grid 0)))))
      (5x5-new-game))
  (5x5-draw-grid (list 5x5-grid))
  (5x5-position-cursor))