Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 chanting in the Monastery: (19)
As of 2015-07-31 14:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls