generated from mwc/lab_retro
finished the game
The program in unit 1, the turtle would draw whatever you made when it starts, but for the nav_game the objects are already made, and you can move things around after it starts
This commit is contained in:
11
nav_game.py
11
nav_game.py
@@ -2,3 +2,14 @@
|
||||
# ------------
|
||||
# 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()
|
||||
Reference in New Issue
Block a user