commit c3690a3eb5b41e6a71342e4089b7f5277091d1b0 Author: mollusk Date: Wed May 8 02:25:26 2019 -0700 add Title screen and music diff --git a/big-booty-judy-drums.mp3 b/big-booty-judy-drums.mp3 new file mode 100644 index 0000000..b944ab6 Binary files /dev/null and b/big-booty-judy-drums.mp3 differ diff --git a/main.py b/main.py new file mode 100755 index 0000000..214ffd1 --- /dev/null +++ b/main.py @@ -0,0 +1,117 @@ +#!/usr/bin/python3 +import contextlib +with contextlib.redirect_stdout(None): #hide pygame welcome message + + import os, sys, pygame + + +def confirmLeave(): + prompt = input("All progress will be lost, are you sure?: [y/N]: ") + + if prompt == "n": + print("Staying in game") + + elif prompt == "y": + mainMenu() + + else: + print("That is not an option") + +def navBar(): + print(""" + ============================ + [m] - Main Menu + ============================ + """) + +def clear(): + os.system("clear") # Windows has no clear screen equivilent so use os.system + +def lvlOne(): + clear() + + navBar() + + while True: + print(""" + + + Level 1 - Quest for big booty! + ----------- + + You find yourself lost in thought while shopping in a grocery store, when suddenly you + notice what appears to be a nice looking woman bending over. Your first instinct is to: + + + 1) Get closer + 2) Stand and stare + """) + + prompt = input(">> ") + + if prompt == "m": + confirmLeave() + + elif prompt == "q": + sys.exit(0) + + else: + print("That key is not an option") + + + +def mainMenu(): + clear() + pygame.init() + theme = pygame.mixer.music.load("big-booty-judy-drums.mp3") + pygame.mixer.music.play(loops=-1, start=0.0) + while 1==1: + print(""" + ____ _ ____ __ _ __ + / __ )(_)___ _ / __ )____ ____ / /___ __ (_)_ ______/ /_ __ + / __ / / __ `/ / __ / __ \/ __ \/ __/ / / / / / / / / __ / / / / + / /_/ / / /_/ / / /_/ / /_/ / /_/ / /_/ /_/ / / / /_/ / /_/ / /_/ / +/_____/_/\__, / /_____/\____/\____/\__/\__, / __/ /\__,_/\__,_/\__, / + /____/ /____/ /___/ /____/ +,:~~~~:::::.~~~:::~====~====~+===::::::: +:::::::::::~::,,,::~==+++++++====~:::::: +:::::::::~~===+=,,=++++?+?++++++=~~~:::: +:,.::::====++++:,==+++????????+++====::: +:,,::====++++++,~=++???????????++++=~=:: +,,,~===++++++++~==+?????????????++++==,, +,,:===++++++++=.=++???????????????+++=~: +,,~==+++++??++=.=++????IIIII??????+++==: +,~===+++????+++.=++????IIIII???????++==~ +,~===+++????+++,~=+?+??IIIII???????+++== +.~~===++?????++~~=++???I?II??????++++=== +,~~~==+++++???+=,=++???????????++++++=== +:~~~~===++++?+?+.~==++????????+++++===== +::~~~~=====++++=~.~==++++++++++++======~ +::::~~~~~====+==~:.~===+++++++======~~~~ +::::::~~~~======~~:.:~=========~~~~~~~~: +::::::::~~~~~~~~~:::...,,::::~~~~~~~~:~~ +:::::,,,::::::::::::,,,,,.,,,,:::::====~ +::::::::,,,::::~=~~:,,,,,.,,,,:~~======~ +::::::::::,,~~====~.,,,::,,:::,~~==++==~ +::::::::::,.~~===~:::::::,,:::,:~===+==~ +,:,,:::::::,~====~.::::::,::::::~==+===: + + """) + print("(S)tart Game") + print("(Q)uit") + + prompt = input(">> ") + + if prompt == "s": + pygame.mixer.music.stop() + pygame.quit() + lvlOne() + + elif prompt == "q": + pygame.quit() + sys.exit(0) + + + + +mainMenu() \ No newline at end of file