-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplay.py
35 lines (29 loc) · 879 Bytes
/
play.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""
This is the file that should be ran when wanting to launch the game
"""
import os
import game as Game
from mario import Mario
from luigi import Luigi
from barrel import Barrel
from princess import Princess
from levelManager import LevelManager
from donkeyKong import DonkeyKong
from flamingOilContainer import FlamingOilContainer
import menu
def play(window, result):
game = Game.GameManager(window)
for player in result.players:
if player.__name__ == "Mario":
game.addPlayer(Mario())
if player.__name__ == "Luigi":
game.addPlayer(Luigi())
game.addObject(Princess())
if result.UseAI:
game.addObject(DonkeyKong().getAI(result.Difficulty))
else:
game.addObject(DonkeyKong())
game.addCollectible(FlamingOilContainer())
game.addLevelManager(LevelManager())
game.play()
menu.show(play)