Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Hanoi

by teamster_jr (Curate)
on Jun 20, 2003 at 09:00 UTC ( #267492=note: print w/ replies, xml ) Need Help??


in reply to Hanoi

Here's the non vt100 version for those that can't see the other

sub d{for(1..$d){for$p(0..2){{$s=$$p[$d-$_]||"|";$f=$"x(($d*2-1-length +$s )/2);printf"$f$s$f"}}print$/;}select$q,$q,$q,(print$/)/3}push@0,"-"x(1 +-2 *$_)for-($d=shift||3)+1..0;sub h{my($n,$s,$d,$i)=@_;if($n>0){h($n-1,$s +,$ i,$d);push@$d,pop@$s;d;h($n-1,$i,$d,$s)}}d;h($d,0,2,1)

al


Comment on Re: Hanoi
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://267492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2014-11-23 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (129 votes), past polls