]>
iEval git - clump.git/blob - newstable.pl
20 my $side = 4; # there are $side * $side CPUs
22 for my $line (0 .. ($side - 1)) {
23 $cpus[$line] = [ ($line * $side) .. (($line + 1) * $side - 1) ]
26 for my $cpu (0 .. ($side * $side - 1)) {
29 for my $direction (0 .. $#diffs) {
30 my $nx = ($x + $diffs[$direction][0] + $side) % $side;
31 my $ny = ($y + $diffs[$direction][1] + $side) % $side;
32 $newstable[$cpu][$direction] = $cpus[$nx][$ny];
36 for my $direction (0 .. $#diffs) {
37 print "$direction: news_out = {";
38 printf 'news_in[%2d]', $newstable[0][$direction];
39 for my $cpu (1 .. ($side * $side - 1)) {
40 printf ', news_in[%2d]', $newstable[$cpu][$direction];
This page took 0.046414 seconds and 5 git commands to generate.