-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
32 lines (27 loc) · 964 Bytes
/
main.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
#!/usr/bin/env python
# Include everything here.
import Gameplay
import CustomizationMenu
import SettingsMenu
import CreditsMenu
import sys
import TutorialMenu
from Globals import application_name
import pygame
import MainMenu
def play_game(player1name, player2name, difficulty_easy, music_on, sfx_on, cheat_code, ship_location):
music_on = music_on[:len(music_on)-1]
sfx_on = sfx_on[:len(sfx_on)-1]
game = Gameplay.Gameplay(player1name, player2name, ship_location, difficulty_easy, music_on, sfx_on, cheat_code)
game.run_game()
if __name__ == "__main__":
# Creating the screen
pygame.init()
pygame.display.set_caption(application_name)
funcs = {'Start': CustomizationMenu.show_customization,
'Quit': sys.exit,
'Settings': SettingsMenu.show_settings,
'Tutorial': TutorialMenu.show_tutorial,
'Credits': CreditsMenu.show_credits}
gm = MainMenu.GameMenu(funcs)
gm.run()