generated from mwc/project_game
Checkpoint 2: Attaching the "asteroid" to the player if the player touches the "asteroid" This part was challenging as there were new commands I learned while trying to incorporate the retro lab componemets. I included the "asteroid sprawner" to get more than on "asteroid" on the screen. The next part is to end the game.
This commit is contained in:
6
game.py
6
game.py
@@ -1,7 +1,11 @@
|
||||
from retro.game import Game
|
||||
from player import Player
|
||||
from apple import Apple
|
||||
from apple_sprawner import AppleSpawner
|
||||
|
||||
board_size = (100, 25)
|
||||
player = Player(board_size)
|
||||
game = Game([player], {"score": 0}, board_size=board_size, color = "white")
|
||||
apple = Apple((board_size[0] // 2, 0))
|
||||
spawner = AppleSpawner()
|
||||
game = Game([player,spawner], {"score": 0}, board_size=board_size, color = "white")
|
||||
game.play()
|
||||
Reference in New Issue
Block a user