Help for this page

Select Code to Download


  1. or download this
    my $possibilities = 2 ** $N; # $N is number of dimensions
    # @mypos is my coordinates.
    ...
     my @pos = map {$mypos[$_] - $shift[$_]} 0 .. $#mypos;
     push @neighbours, \@pos;
    }