altos/lisp: Clean up hanoi.lisp demo a bit
authorKeith Packard <keithp@keithp.com>
Sun, 20 Nov 2016 09:41:59 +0000 (01:41 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 20 Feb 2017 19:16:52 +0000 (11:16 -0800)
No serious changes.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/test/hanoi.lisp

index b5f2d0f5b3099ff639898a8870f576f028c17904..e2eb0fa00854dd3732496ca02e210feb8d142fc5 100644 (file)
                                        ; ANSI control sequences
 
 (defun move-to (col row)
-  (patom "\033[" row ";" col "H" nil)
+  (patom "\033[" row ";" col "H")
   )
 
 (defun clear ()
-  (patom "\033[2J" nil)
+  (patom "\033[2J")
   )
 
 (defun display-string (x y str)
                                        ; Move a piece from the top of one stack
                                        ; to the top of another
 
+(setq move-delay 100)
+
 (defun move-piece (from to)
   (let ((from-stack (nth stacks from))
        (to-stack (nth stacks to))
     (setq stacks (replace stacks from from-stack))
     (setq stacks (replace stacks to to-stack))
     (display)
-    (delay 100)
+    (delay move-delay)
     )
   )
 
   (clear)
   (_hanoi len 0 1 2)
   (move-to 0 23)
+  t
   )