Add diagrams and pictures
[clump.git] / newstable.pl
index 233d317e1f660fcc3b97a432dd4204ec8594fb89..67957b8d8da967c0e78d3dd9446823630b007219 100644 (file)
@@ -4,20 +4,20 @@ 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;
 
 my @newstable;
 
-my $side = 8; # there are $side * $side CPUs
+my $side = 4; # there are $side * $side CPUs
 
 for my $line (0 .. ($side - 1)) {
        $cpus[$line] = [ ($line * $side) .. (($line + 1) * $side - 1) ]
@@ -34,10 +34,11 @@ for my $cpu (0 .. ($side * $side - 1)) {
 }
 
 for my $direction (0 .. $#diffs) {
-       print "$direction: flag_or_news = {";
-       printf 'latest_news[%2d]', $newstable[0][$direction];
-       for my $cpu (1 .. ($side * $side - 1)) {
-               printf ', latest_news[%2d]', $newstable[$cpu][$direction];
+       print "$direction: news_out = {";
+       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.010018 seconds and 4 git commands to generate.