asteroid.py asteroid_spawner.py spaceship.py nav_game.py

This commit is contained in:
njmason2
2025-11-14 00:29:44 -05:00
parent 5356f5076b
commit 24476f3bed
8 changed files with 79 additions and 0 deletions

View File

@@ -2,3 +2,13 @@
# ------------
# By MWC Contributors
# This class implements a simple game where a spaceship avoids asteroids.
from retro.game import Game
from spaceship import Spaceship
from asteroid_spawner import AsteroidSpawner
board_size = (25, 25)
ship = Spaceship(board_size)
spawner = AsteroidSpawner()
game = Game([ship, spawner], {"score": 0}, board_size=board_size)
game.play()