🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #2548

Wanted: Tower of Hanoi Solution

#2548
From: Bill "Bill" Tuthill
Date: Mon, 25 Feb 1991 21:24
35 lines
1565 bytes
We have converted most of our documents from troff to FrameMaker,
but I am unable to convert this Tower of Hanoi program written
in troff.  Could anyone supply the equivalent for FrameMaker or
Interleaf?  Thanks in advance.

================
.de T
.nr d \\$1-1
.if \\nd .T \\nd \\$2 \\$4 \\$3
 Transfer ring \\$1 from tower \\$2 to tower \\$3.
.nr d \\$1-1
.if \\nd .T \\nd \\$4 \\$3 \\$2
..
Initial state:  \nR rings all on tower A; #1 on top.
.T \nR A B C
 Done!
================
$ troff -rR4
Initial state: 4 rings all on tower A; #1 on top.
 Transfer ring 1 from tower A to tower C.
 Transfer ring 2 from tower A to tower B.
 Transfer ring 1 from tower C to tower B.
 Transfer ring 3 from tower A to tower C.
 Transfer ring 1 from tower B to tower A.
 Transfer ring 2 from tower B to tower C.
 Transfer ring 1 from tower A to tower C.
 Transfer ring 4 from tower A to tower B.
 Transfer ring 1 from tower C to tower B.
 Transfer ring 2 from tower C to tower A.
 Transfer ring 1 from tower B to tower A.
 Transfer ring 3 from tower C to tower B.
 Transfer ring 1 from tower A to tower C.
 Transfer ring 2 from tower A to tower B.
 Transfer ring 1 from tower C to tower B.
 Done!
Technical Details
Message-ID: <8564@exodus.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!convex!texsun!male!jethro!exodus!cairo.Eng.Sun.COM!tut

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!convex!texsun!male!jethro!exodus!cairo.Eng.Sun.COM!tut
From: tut@cairo.Eng.Sun.COM (Bill "Bill" Tuthill)
Newsgroups: comp.text
Subject: Wanted: Tower of Hanoi Solution
Message-ID: <8564@exodus.Eng.Sun.COM>
Date: 25 Feb 91 21:24:56 GMT
Sender: news@exodus.Eng.Sun.COM
Lines: 35