* lisp/play/5x5.el: I/ Add an arithmetic solver to suggest positions to
[bpt/emacs.git] / lisp / play / hanoi.el
index fddfe22..ac78a86 100644 (file)
@@ -6,7 +6,7 @@
 
 ; Author (a) 1985, Damon Anton Permezel
 ; This is in the public domain
-; since he distributed it without copyright notice in 1985.
+; since he distributed it in 1985 without copyright notice.
 ;; This file is part of GNU Emacs.
 ;
 ; Support for horizontal poles, large numbers of rings, real-time,
   :group 'games)
 
 (defcustom hanoi-horizontal-flag nil
-  "*If non-nil, hanoi poles are oriented horizontally."
+  "If non-nil, hanoi poles are oriented horizontally."
   :group 'hanoi :type 'boolean)
 
 (defcustom hanoi-move-period 1.0
-  "*Time, in seconds, for each pole-to-pole move of a ring.
+  "Time, in seconds, for each pole-to-pole move of a ring.
 If nil, move rings as fast as possible while displaying all
 intermediate positions."
   :group 'hanoi :type '(restricted-sexp :match-alternatives (numberp 'nil)))
 
 (defcustom hanoi-use-faces nil
-  "*If nil, all hanoi-*-face variables are ignored."
+  "If nil, all hanoi-*-face variables are ignored."
   :group 'hanoi :type 'boolean)
 
 (defcustom hanoi-pole-face 'highlight
-  "*Face for poles.  Ignored if hanoi-use-faces is nil."
+  "Face for poles.  Ignored if hanoi-use-faces is nil."
   :group 'hanoi :type 'face)
 
 (defcustom hanoi-base-face 'highlight
-  "*Face for base.  Ignored if hanoi-use-faces is nil."
+  "Face for base.  Ignored if hanoi-use-faces is nil."
   :group 'hanoi :type 'face)
 
 (defcustom hanoi-even-ring-face 'region
-  "*Face for even-numbered rings.  Ignored if hanoi-use-faces is nil."
+  "Face for even-numbered rings.  Ignored if hanoi-use-faces is nil."
   :group 'hanoi :type 'face)
 
 (defcustom hanoi-odd-ring-face 'secondary-selection
-  "*Face for odd-numbered rings.  Ignored if hanoi-use-faces is nil."
+  "Face for odd-numbered rings.  Ignored if hanoi-use-faces is nil."
   :group 'hanoi :type 'face)
 
 
@@ -150,6 +150,7 @@ Start after n steps, where BITS is a big-endian list of the bits of n.
 BITS must be of length nrings.  Start at START-TIME."
   (switch-to-buffer "*Hanoi*")
   (buffer-disable-undo (current-buffer))
+  (setq show-trailing-whitespace nil)
   (unwind-protect
       (let*
          (;; These lines can cause Emacs to crash if you ask for too
@@ -354,7 +355,6 @@ BITS must be of length nrings.  Start at START-TIME."
         (fly-steps (abs (/ (- (cdr to) (cdr from)) fly-step)))
         (directed-fly-step (/ (- (cdr to) (cdr from)) fly-steps))
         (baseward-steps (/ (- (car to) (cdr to)) baseward-step))
-        (total-steps (+ flyward-steps fly-steps baseward-steps))
         ;; A step is a character cell.  A tick is a time-unit.  To
         ;; make horizontal and vertical motion appear roughly the
         ;; same speed, we allow one tick per horizontal step and two
@@ -446,5 +446,4 @@ BITS must be of length nrings.  Start at START-TIME."
 
 (provide 'hanoi)
 
-;;; arch-tag: 7a901659-4346-495c-8883-14cbf540610c
 ;;; hanoi.el ends here