generated from mwc/project_game
A recent success that I am proud of is that I was able to give the player the ability to move up, down, left, and right. When implementing the ability to move up and down it seemed that the code was opposite of what I expected it to be. I was able to figure out how to implement it the correct way.
9 lines
268 B
Python
9 lines
268 B
Python
from retro.game import Game
|
|
from person import Spaceship
|
|
from spawner import AsteroidSpawner
|
|
|
|
board_size = (25, 25)
|
|
ship = Spaceship(board_size)
|
|
spawner = AsteroidSpawner()
|
|
game = Game([ship, spawner], {"score": 0,"lives":5}, board_size=board_size)
|
|
game.play() |