diff --git a/falling_sand.py b/falling_sand.py index 906e759..1af02eb 100644 --- a/falling_sand.py +++ b/falling_sand.py @@ -174,14 +174,13 @@ class FallingSand: def spawn_sand(self, position): x, y = position - for ax in range(-4, 5): - for ay in range(-4, 5): - print(ax, ay) + for ax in range(-8, 9): + for ay in range(-8, 9): bx, by = position bx += ax by += ay - if self.matrix[bx, by] == self.sand_surface.map_rgb(self.gray): + if 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)))