Help for this page

Select Code to Download


  1. or download this
        $newgrid[$x][$y] = given @.grid[$x][$y]
        {
          when 0   { 1 if $live == 3};
          when 1   { 1 if 1 <  $live < 4 }:
        } || 0;
    
  2. or download this
    $newgrid[$x][$y] = given @.grid[$x][$y] {
          when 0  { 1 if $live == 3};
          when 1  { 1 if 1 <  $live < 4 };
          default { 0 };
        };