Abelian sandpile model: Difference between revisions
m
→{{header|Raku}}: Backport some tweaks and minor bug squashing
m (Phix/pGUI) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: Backport some tweaks and minor bug squashing) |
||
Line 1,664:
loop (my int $idx = $rs; $idx < $re; $idx = $idx + 1) {
if @buffer[$idx] >= 4 {
@buffer[ $idx + 1 ]
@buffer[ $idx ] %= 4;
$done = False;
}
Line 1,674 ⟶ 1,675:
}
unless $hide-progress {
print "\e[1;1H", @buffer.map( { @color[$_ min 4] }
}
} until $done;
print "\e[1;1H", @buffer.map( { @color[$_ min 4] }
cleanup;</lang>
|