generated from mwc/project_game
18 lines
665 B
Python
18 lines
665 B
Python
# cd ~/Desktop/making_with_code/mwc1/unit3/project_game/Tron
|
|
# python nav_game.py
|
|
|
|
|
|
from random import randint
|
|
from retro.game import Game
|
|
from Bike import Bike
|
|
|
|
if __name__ == '__main__':
|
|
# Initialize Player 1: Player #1, starting at position (5, 8), moving RIGHT
|
|
p1 = Bike(player_number=1, start_position=(5, 8), start_direction=Bike.RIGHT)
|
|
|
|
# Initialize Player 2: Player #2, starting at position (25, 8), moving LEFT
|
|
p2 = Bike(player_number=2, start_position=(25, 8), start_direction=Bike.LEFT)
|
|
|
|
# Create and start the game with both bikes
|
|
game = Game([p1, p2], {"*": "Play on!"}, board_size=(32, 16), framerate=8)
|
|
game.play() |