diff options
Diffstat (limited to 'src/sliceitoff/field/field.py')
-rw-r--r-- | src/sliceitoff/field/field.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sliceitoff/field/field.py b/src/sliceitoff/field/field.py index 6baf966..a062159 100644 --- a/src/sliceitoff/field/field.py +++ b/src/sliceitoff/field/field.py @@ -114,6 +114,10 @@ class Field(pygame.sprite.LayeredUpdates): def active_sprites(self): """ Returns all sprites that are not dead """ return [s for s in self.sprites() if not s.dead] + + def active_rects(self): + """ Returns active areas as rects """ + return [s.rect for s in self.sprites() if not s.dead] def explode(self, area): sx, sy, w, h = area |