Anonymous user
Talk:Abelian sandpile model: Difference between revisions
→A more readable Python solution.
(→A more readable Python solution.: new section) |
|||
Line 68:
print('\nAfter:')
show_area()
</lang>
Output:
<lang>
Before:
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
After:
0 0 0 0 0 0 0 0 0 0
0 0 0 1 2 1 0 0 0 0
0 0 2 2 2 2 2 0 0 0
0 1 2 2 2 2 2 1 0 0
0 2 2 2 0 2 2 2 0 0
0 1 2 2 2 2 2 1 0 0
0 0 2 2 2 2 2 0 0 0
0 0 0 1 2 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
</lang>
|