-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.py
More file actions
37 lines (29 loc) · 889 Bytes
/
Main.py
File metadata and controls
37 lines (29 loc) · 889 Bytes
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
35
36
37
from WindowAndScreenStuff.Window import Window
from WindowAndScreenStuff.StartScreen import StartScreen
from WindowAndScreenStuff.GameScreen import GameScreen
from Characters.Apple import Apple
import threading
GAME_TITLE = "wildberry"
WIDTH = 1200
HEIGHT = 800
class Game:
def __init__(self):
self._wildberryWindow = Window(GAME_TITLE,WIDTH,HEIGHT)
def getGameWindow(self):
return self._wildberryWindow.getWindow()
def run(self):
StartScreen(self.getGameWindow())
p1 = "Apple"
p2 = "Apple"
GameScreen(self.getGameWindow(),p1,p2)
self.getGameWindow().close()
class MusicPlayer(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
exec(open("Music.py").read())
if __name__ == "__main__":
m = MusicPlayer()
m.start()
game = Game()
game.run()