Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Game of Life

by teamster_jr (Curate)
on Sep 22, 2006 at 09:27 UTC ( [id://574347]=note: print w/replies, xml ) Need Help??


in reply to Game of Life

print"\ec";for$b(0..15){$e[$b].=int 2*rand for 0..($h=30)}{$b=-1;for$f +(@ a=@e){$e[++$b]="";print"\e[$b\H$f$/";for$c(0..$h){$l=0;for($b-1..$b+1) +{$ _=$_>0&&$_<$h?substr$a[$_],$c?$c-1:$c,$c==$h?2:$c?3:2:1;$l+=tr/0//}$l- +=$ d=!substr$f,$c,1;$e[$b].=$l==3||$l==2&&$d?0:$"}}select$q,$q,$q,0.1;red +o}
288 chars ;)
from here
a

edit: ps. probably needs vt100 terminal

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-23 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found