Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Game of Life

by jimt (Chaplain)
on Sep 21, 2006 at 18:47 UTC ( [id://574225]=obfuscated: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    my($a,$c,$g,@b)=(40,10);$\=$/;for my$r(0..$a){$b
    ...
    $a){print map{$b[$r][$_]} (0..$a)}select $&,$&,
    $&,.4}while(&g)
    
  2. or download this
    
    $a=40;$\=$/;@a=0..$a;for$r(@a){$b[$r][$_]
    ...
    $d}{print"\ec",++$g,$\,map{@{$b[$_]},$\}
    @a;select$&,$&,$&,.1;redo if&g}
    
  3. or download this
    
    @a=0..40;for$r(@a){$b[$r][$_]=!int rand
    ...
    $_]=$h==3|$h==2&$b[$r][$_]ne$"?0:$"}}@b=
    @e;redo}
    
  4. or download this
    
    @a=0..40;$b[$_]=[map{rand 9<1?0:$"}@a]
    ...
    $j>40)&($i^$r||$j^$_)}}$b[$r][$_]=$h==3|
    $h==2&$e[$r][$_]ne$"?0:$"}}redo}
    
  5. or download this
    
    my ($a, $c, $g, @b) = (40, 10);
    ...
    } while (&g)
    
  6. or download this
    
    my ($board_size, $random_seed, $generation, @board) = (40, 10);
    ...
    } while (&generate)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://574225]
Approved by Paladin
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found