Abelian sandpile model: Difference between revisions
Content added Content deleted
imported>RegalCode (Implementation for Abelian sand pile) |
Alextretyak (talk | contribs) m (→{{header|11l}}: new way of specifying file open mode) |
||
Line 69: | Line 69: | ||
simulate(&grid) |
simulate(&grid) |
||
V ppm = File(‘sand_pile.ppm’, |
V ppm = File(‘sand_pile.ppm’, WRITE) |
||
ppm.write_bytes(("P6\n#. #.\n255\n".format(grid.len, grid.len)).encode()) |
ppm.write_bytes(("P6\n#. #.\n255\n".format(grid.len, grid.len)).encode()) |
||
V colors = [[Byte(0), 0, 0], |
V colors = [[Byte(0), 0, 0], |