; Here's the pieces to display
-(setq stack '("*" "**" "***" "****" "*****" "******" "*******"))
-
-(setq top (+ (length stack) 3))
+(setq stack '(" * " " *** " " ***** " " ******* " " ********* " "***********"))
;
; Here's all of the stacks of pieces
)
)
(t (progn
- (display-string x y " ")
+ (display-string x y " ")
(display-stack x (1+ y) (1- clear) stack)
)
)
(defun reset-stacks ()
(setq stacks (list stack nil nil))
+ (setq top (+ (length stack) 3))
(length stack)
)
(setq stacks (replace stacks from from-stack))
(setq stacks (replace stacks to to-stack))
(display)
- (delay 100)
+; (delay 100)
)
)
(clear)
(_hanoi len 0 1 2)
)
+
+(defun hanois(n)
+ (while (> n 0)
+ (progn
+ (hanoi)
+ (setq l (1- l))
+ )
+ )
+ )