home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
logo
/
winlogo
/
lib
/
hanoihlp.lg
< prev
next >
Wrap
Text File
|
1990-06-11
|
467b
|
19 lines
to hanoihlpr :number :from :to :other
!
! Called by HANOI. Contains the actual recursive Towers of Hanoi algorithm
!
local "tcf
local "tct
if equalp :number 0 [stop]
hanoihlpr :number-1 :from :other :to
make "tcf towercnt :from
make "tct towercnt :to
towerset :from :tcf - 1
putdisk :from :number "temp
putdisk :to :number "temp
putdisk :from :number "erase
putdisk :to :number "final
towerset :to :tct + 1
hanoihlpr :number-1 :other :to :from
end