Fixed another stuuuuubid crash.
This commit is contained in:
parent
19210b0032
commit
5c773fa3db
1 changed files with 1 additions and 1 deletions
|
@ -213,7 +213,7 @@ class FallingSand:
|
||||||
bx += ax
|
bx += ax
|
||||||
by += ay
|
by += ay
|
||||||
|
|
||||||
if not bx > self.sand_surface.get_width() - 2 and self.matrix[bx, by] == self.sand_surface.map_rgb(self.gray) and bx % 2 == 0 and by % 2 == 0:
|
if bx < self.sand_surface.get_width() - 2 and by < self.sand_surface.get_height() -2 and self.matrix[bx, by] == self.sand_surface.map_rgb(self.gray) and bx % 2 == 0 and by % 2 == 0:
|
||||||
self.falling_sand_particles.append(FallingSandParticle(self, (bx, by), color))
|
self.falling_sand_particles.append(FallingSandParticle(self, (bx, by), color))
|
||||||
|
|
||||||
def rainbow(self):
|
def rainbow(self):
|
||||||
|
|
Loading…
Reference in a new issue