| 1 |
% Author: Brian Blackmore <[email protected]> |
| 2 |
% Date: January 1, 2012 |
| 3 |
% Version: 20120102 |
| 4 |
% License: Public Domain |
| 5 |
% Requirements: Plain TeX |
| 6 |
|
| 7 |
% |
| 8 |
% % |
| 9 |
% % |
| 10 |
% % |
| 11 |
% Tower % |
| 12 |
% of % |
| 13 |
% Brahma % |
| 14 |
% (Plain TeX) % |
| 15 |
% by Brian % |
| 16 |
% Blackmore % |
| 17 |
% 20120101 % |
| 18 |
% % |
| 19 |
\nopagenumbers\output{}{} |
| 20 |
\chardef\_13\catcode%edocta |
| 21 |
126 \_ \let ^^> \catcode~47 0 |
| 22 |
~95/_/let_\let~43/__^^k/def ~64 |
| 23 |
11 ~81\_ ~86 1 ~119 ~86 ~85 2 ~87 |
| 24 |
~85 ~`/!/_~80\__P/vsize~34 14~83\_+ |
| 25 |
S#1{}~`/X13_X\expandafter\divide\hsize |
| 26 |
by3 \multiplyP3 \output{\shipout/vbox to |
| 27 |
0.34PV\hbox to\z@w\vsplit255 to0.34P\hfil% A |
| 28 |
\vsplit255 to0.34P\hfil/vbox to0.34Pw\unvbox SVU |
| 29 |
Sa 255U\hssWU\ifnum/outputpenalty>-10000\else" \font |
| 30 |
\dosupereject\fiW ~`\>13_^^~\rightline _!\count \font"% |
| 31 |
/rm=cmr8\rm\baselineskip9pt !2 0 +/AV1 2 3 4 5 6 7 8 9 10 11 |
| 32 |
12 13 14 15 VW wU}+\BwVU wUW +\CV{U w}}+/spw\vboxw>V Move Sb/the |
| 33 |
!2U>w/A:U>V\B:W>w\C:}}\vskip8pt plus4pt }+\f#1 #2f{#1U +/nf#1 #2fV%W |
| 34 |
#2W +\h#1wX\f#1fW +/T#1VX\nf#1f} +\rh#1w\xdef#1V/TV#1}WU SwU+\move#1#2{" |
| 35 |
\global\advance!2by1 /edef\twX\hV#1}W/rhw#1W\xdef#2VSwby-1 7W\t\space#2}/spW |
| 36 |
+Q#1#2#3#4w\ifnum#1=1 \moveV#2}w#3U/elseV!0 #1\advance!0by-1 \edef/taV"#7WWVabcd |
| 37 |
/the!0WQw/ta}V#2Ww#4}{#3W/moveV#2UV#3}QV\ta}w#4Ww#3Ww#2U}/fi}Q V10WV/AUw\C}V/BW \bye |
| 38 |
======================================================================================= |
| 39 |
If you want the full tower with 15 discs, change this number ten ^^ to 15 for 713 pgs. |
| 40 |
|
| 41 |
Happy TeXing in 2012! |
| 42 |
|
| 43 |
======================================================================================= |