Function: 5x5-randomize

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

Signature

(5x5-randomize)

Documentation

Randomize the grid.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/play/5x5.el.gz
(defun 5x5-randomize ()
  "Randomize the grid."
  (interactive nil 5x5-mode)
  (when (5x5-y-or-n-p "Start a new game with a random grid? ")
    (setq 5x5-x-pos (/ 5x5-grid-size 2)
          5x5-y-pos (/ 5x5-grid-size 2)
          5x5-moves 0
          5x5-grid  (5x5-make-random-grid (symbol-function '5x5-make-move))
	  5x5-solver-output nil)
    (unless 5x5-cracking
      (5x5-draw-grid (list 5x5-grid)))
    (5x5-position-cursor)))