#
# NEED_PARMS height start end help
#
# HELP: SYNOPSIS:
# HELP:     hanoi/run height start end help
# HELP:
# HELP: DESCRIPTION:
# HELP:     Play the "towers of hanoi" game. Parameters give initial height
# HELP:     of the tower and numbering of the towers (0-2).
#
#cecho Asking Hanoi to move ${$argv[1]} from ${$argv[2]} to ${$argv[3]} using ${$argv[4]}
if ${(int)$argv[1]==0} QUIT
if ${$root.global.escape} QUIT
macro ${$argv[0]} ${(int)$argv[1]-1} ${$argv[2]} ${$argv[4]} ${$argv[3]}
#cecho Moving Disk ${$argv[1]} from ${$argv[2]} to ${$argv[3]}
if ${$root.global.escape} QUIT
macro hanoi/movedisc ${(int)$argv[1]} ${$argv[2]} ${$argv[3]}
macro ${$argv[0]} ${(int)$argv[1]-1} ${$argv[4]} ${$argv[3]} ${$argv[2]}
