summaryrefslogtreecommitdiff
path: root/src/sliceitoff/enemies/enemies.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff/enemies/enemies.py')
-rw-r--r--src/sliceitoff/enemies/enemies.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sliceitoff/enemies/enemies.py b/src/sliceitoff/enemies/enemies.py
index c52059f..ee8109b 100644
--- a/src/sliceitoff/enemies/enemies.py
+++ b/src/sliceitoff/enemies/enemies.py
@@ -1,3 +1,4 @@
+""" enemies.enemies - group for enemies for the leve"""
from random import randrange
import pygame
@@ -5,7 +6,8 @@ from .ball import EnemyBall
from .bouncher import EnemyBouncher
class Enemies(pygame.sprite.Group):
- def __init__(self, field = None, count = 0):
+ """ Init with count. Randomizing enemy types. Some are worth more. """
+ def __init__(self, count = 0):
super().__init__()
while count:
match randrange(0,4):
@@ -17,9 +19,8 @@ class Enemies(pygame.sprite.Group):
if count >= 2:
self.add(EnemyBouncher())
count -= 2
- self.field = field
- def update(self, field_rects = [], **kwargs):
+ def update(self, field_rects = None, **kwargs):
""" Do actions on enemies that are only partly on the fields """
super().update(**kwargs)
for enemy in self.sprites():