Make it work
[clump.git] / newstable.pl
index cbfbbd7da0594d2ab3b80800f418729e5a84e888..67957b8d8da967c0e78d3dd9446823630b007219 100644 (file)
@@ -4,13 +4,13 @@ use warnings;
 
 my @diffs = (
        [-1,  0],
-#      [-1,  1],
        [0 ,  1],
-#      [1 ,  1],
        [1 ,  0],
-#      [1 , -1],
        [0 , -1],
-#      [-1, -1]
+       [-1, -1],
+       [-1,  1],
+       [1 ,  1],
+       [1 , -1],
 );
 
 my @cpus;
@@ -35,8 +35,9 @@ for my $cpu (0 .. ($side * $side - 1)) {
 
 for my $direction (0 .. $#diffs) {
        print "$direction: news_out = {";
-       printf 'news_in[%2d]', $newstable[0][$direction];
-       for my $cpu (1 .. ($side * $side - 1)) {
+       printf 'news_in[%2d]', $newstable[$side * $side - 1][$direction];
+       my @lst = 0 .. ($side * $side - 2);
+       for my $cpu (reverse @lst) {
                printf ', news_in[%2d]', $newstable[$cpu][$direction];
        }
        say '};'
This page took 0.009253 seconds and 4 git commands to generate.