Abelian sandpile model: Difference between revisions
Content added Content deleted
m (improved Forth solution) |
|||
Line 88: | Line 88: | ||
: prep-stack HEIGHT 4 u>= if center push then ; |
: prep-stack HEIGHT 4 u>= if center push then ; |
||
: prepare prep-arr prep-stack ; |
: prepare prep-arr prep-stack ; |
||
: ensure if else 2drop 0 |
: ensure if else 2drop 0 2rdrop exit then ; |
||
: col>=0 dup 0>= ensure ; |
: col>=0 dup 0>= ensure ; |
||
: col<SIZE dup SIZE < ensure ; |
: col<SIZE dup SIZE < ensure ; |