After the so-called "avalanche", where the fractal has finished
forming as there are no more candidates for toppling, we no longer
need the threads to be working. As an intensive operation, it makes
no sense to continue processing when we are sure there is no further
dynamic behaviour possible.
Using a tick based solution, every DELTA ticks we check if the
avalanche is completed. If so, we clean up all the threads AND ensure
that we no longer need to be checking for avalanches.
Stopped adding a grain of sand per step.
Collapsing should work properly for any amount of sand grains,
regardless of whether it's 4 or 4000. Previous code fixed it at 4
always, and how it distributed was so as well. Now we distribute as
much sand as we can.
This comes from the idea that, instead of incrementing while
rendering, let's just set some n pixels in the centre and see how the
model distributes them.
Big bug with file handler: I can write data well, but reading it
causes some trace error which I cannot be bothered to fix. So I'll
just work on making the step function way more efficient.
Per iteration, increment the centre of the grid, and perform any
collapsing necessary (if >= 4 then sand pile "collapses" onto its
cardinal directions).