def main():#The main function
    screen = makeScreen()#Calls the make screen function
    game_folder = os.path.dirname(__file__)#Makes the file path of the game
    menus.welcomeScreen(screen)#Displays the welcome screen
    done = False
    while not done:#Makes a loop
        players = menus.mainMenu(screen)#Calls the main menu function to get the amount of players
        counterList, multipliers = play.play(screen, players, game_folder)#Plays the game
        menus.scoreMenu(screen, game_folder, counterList, multipliers)#Displays the scores
Beispiel #2
0
def main():
    os.system('clear')
    while True:
        mainMenu()
        try:
            answer = int(input("Choose option: "))
        except ValueError:
            print("No valid integer! Please try again ...")
            exit(1)
        if answer == 1:
            print("List of benchmarks")
            supportedProtocol()
        elif answer == 2:
            protocolToVerify = protocol()
            attackVersion(protocolToVerify)
        elif answer == 3:
            print("Exit")
            exit(0)
        else:
            print("Bad option")
            exit(-1)
Beispiel #3
0
def main():

    program = True
    while program == True:
        select = menus.mainMenu()
        if select == False:
            var = start.start()
            if var == 'hp':
                finalData, fileName = scans.scanMain()
                fill.fillIn(finalData, fileName)

        elif select == True:
            print('ramiz get working on the about screen!')
        else:
            program = False
Beispiel #4
0
import pygame

pygame.init()

from menus import mainMenu
from game import game

#pygame.time.Clock().tick(1)

(width, height) = (780, 420)
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption('Snake')
pygame.display.flip()

mainMenu(screen)
Beispiel #5
0
def on_mouse_release(x, y, button, modifiers):
    functionsToFire = []
    for i in AllMenus:
        for k, v in AllMenus[i].menuItems.iteritems():
            if k in AllMenus[i].readableLabels:
                if v[0].checkPress(x, y):
                    functionsToFire.append(v[1])
    for i in functionsToFire:
        i()
    for i in AllMenus:
        for k, v in AllMenus[i].menuItems.iteritems():
            v[0].upImage()


if __name__ == '__main__':
    # We can kick off the rest of the entire game from showing the main menu.
    mainMenu()

    # Load the background image
    #  This should be broken out into some sort of loading module that can
    #  figure out assets to load and handle things more gracefully.
    BackgroundImage = pyglet.image.load(
        os.path.join(os.path.dirname(__file__), 'resources',
                     'background_576p.png'))
    BackgroundSprite = pyglet.sprite.Sprite(img=BackgroundImage, x=0, y=0)
    BackgroundSprite.batch = RENDER_BATCH
    BackgroundSprite.group = BACKGROUND_LAYER

    # Finally, start the application
    pyglet.app.run()
Beispiel #6
0
# Sources
# https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html

from menus import mainMenu
import sys

if __name__ == "__main__":
    useSavedModels = False
    try:
        sys.argv[1:][0] == '-s'
        useSavedModels = True
    except:
        useSavedModels = False
    if (useSavedModels):
        print("-" * 10 + "" + "-" * 10)
        print("SAVED MODELS WILL BE USED...")
    mainMenu(useSavedModels)
Beispiel #7
0
while exitProgram is False:
    enterProgram = False
    while enterProgram is False:
        navigate = startMenu()
        currentUser = UserAccount()
        if navigate == "1":
            enterProgram = signin(cursor, currentUser)
        elif navigate == "2":
            newUserName = input("Please enter a username: "******"1":
            viewLists(cursor, database, currentUser)
        elif navigate == "2":
            createlist(cursor, database, currentUser, currentStore,
                       currentItem)
        elif navigate == "3":
            lookupItemPrice(cursor)
        elif navigate == "4":
            showAllItems(cursor, currentItem)
        elif navigate == "5":
            accountSettings(cursor, database, currentUser)
        elif navigate == "6":
Beispiel #8
0
	def __init__(self):
		r = menus.mainMenu()
		self.flag = r.run()