Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Game of Life

by teamster_jr (Curate)
on Sep 22, 2006 at 09:27 UTC ( #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


Comment on Re: Game of Life
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://574347]
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-09-24 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (244 votes), past polls