This commit is contained in:
2025-07-13 19:00:57 +02:00
parent 01a298e864
commit b78a164429
4 changed files with 26 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ from asteroid import Asteroid
from asteroidfield import AsteroidField
from constants import *
from player import Player
from shot import Shot
def main():
print("Starting Asteroids!")
@@ -25,10 +26,12 @@ def main():
updatable = pygame.sprite.Group()
drawable = pygame.sprite.Group()
asteroids = pygame.sprite.Group()
shots = pygame.sprite.Group()
Asteroid.containers = (asteroids, updatable, drawable)
AsteroidField.containers = (updatable)
Player.containers = (updatable, drawable)
Shot.containers = (shots, updatable, drawable)
player = Player(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2)
asteroidField = AsteroidField()