summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-11-20 01:41:59 -0800
committerKeith Packard <keithp@keithp.com>2017-02-20 11:16:52 -0800
commit30d6b241447cb922b9316e86817f6e31eb973eed (patch)
tree94b457de13ac970906d564b6822e75f2482588f0 /src
parent329f76d5e2732ab1c1b10223842d7816275c7e8b (diff)
altos/lisp: Clean up hanoi.lisp demo a bit
No serious changes. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/test/hanoi.lisp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/test/hanoi.lisp b/src/test/hanoi.lisp
index b5f2d0f5..e2eb0fa0 100644
--- a/src/test/hanoi.lisp
+++ b/src/test/hanoi.lisp
@@ -17,11 +17,11 @@
; 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)
@@ -112,6 +112,8 @@
; 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))
@@ -121,7 +123,7 @@
(setq stacks (replace stacks from from-stack))
(setq stacks (replace stacks to to-stack))
(display)
- (delay 100)
+ (delay move-delay)
)
)
@@ -149,4 +151,5 @@
(clear)
(_hanoi len 0 1 2)
(move-to 0 23)
+ t
)