def inventorymenu(): anstrue=True while anstrue: print(""" 1.Sprawdź aktualnie założone przedmioty 2.Zmień ekwipunek 3.Otórz torbę podręczną 4.Wróć do głównego menu """) ans=input("Co zamierzasz zrobić?") if ans =="1": inventorycharacter() exit() elif ans =="2": changeeq() exit() elif ans=="3": openbag() exit() elif ans=="4": print("Wracasz go głównego menu") menu.mainmenu() exit() else: print('Wybierz wartosc 1-4')
def mainmenu(): print("~~ Swin Virtual Run ~~\n") print("[1] Single Registration") print("[2] Couple Registration") print("[3] Group Registration") print("[4] Calculate and Quit\n\n") print("[0] Summary\n") choice = input("Choice:") if int(choice) == 1: ticket = input("How many single ticket?") print("Registration for " + str(ticket) + " runner is successful") calculatepurchase.cal1(ticket) print("") menu.mainmenu() elif int(choice) == 2: couple = input("How many couple?") print("Registration for " + str(couple) + " couple is successful") calculatepurchase.cal2(couple) print("") menu.mainmenu() elif int(choice) == 3: menu.groupmenu() print("") menu.mainmenu() elif int(choice) == 4: displaypurchase.displaybuy() elif int(choice) == 0: summary.summary() menu.mainmenu() else: print("Please select correct choice menu !!!") menu.mainmenu()
def arenamenu(): with open("save.json", "r") as save: json.load(save) print(f"Witaj na arenie, {hero.yourhero}") print("Wybierz przeciwnika z którym będziesz walczyć:") anstrue = True while anstrue: print(""" 1. Poziom 1 : Kretoszczur 2. Poziom 5 : Wilk 3. Poziom 10 : Bandyta 4. Wróć do menu """) enemy = input() if enemy == "1": print( "Stajesz naprzeciw Kretoszczura. Potwór zgrzyta zębami i szykuje się do ataku. Co robisz?" ) combat() elif enemy == "2": print( "Wilk wyje na twój widok i zanim się obejrzałeś, atakuje. Co robisz?" ) combat() elif enemy == "3": print( "Bandyta opiera swój miecz na ramieniu i uśmiecha się w Twoją stronę kpiąco. Jaki jest Twój ruch?" ) combat() elif enemy == "4": print("Wracasz do menu") menu.mainmenu() exit() else: print('Wybierz wartosc 1-4')
def main(args=None): if args is None: args = sys.argv[1:] args = getArgs() args = stretch.expandargs(args) # Execution Redux (Interactive Mode vs. Single Command Mode) if args.MAPFILE is None: menu.mainmenu(args) else: if args.tileset is None: themes.printThemes() args.tileset = themes.selTheme(args.tileset) if args.savetiles: start = time.time() tmpRes = themes.canGenerate(args.tileset, True) tmpRes = themes.generateTheme(tmpRes) if themes.writeTheme(args.tileset, tmpRes) is False: print("Theme cannot be saved - insufficient resources.") else: if args.measure: end = time.time() print("Theme generation done in", end - start, "seconds.") if args.measure: start = time.time() print("Attempting map generation...") tmpTheme = themes.canGenerate(args.tileset, True) tmpTheme = themes.generateTheme(tmpTheme) tmpMap = txtmap.readMap(args.MAPFILE) tmpMap = txtmap.parseMap(tmpMap) tmpMap = imgmap.generateMap(args, tmpTheme, tmpMap) if imgmap.writeMap(args, tmpMap) is False: print("Map cannot be saved - insufficient resources.") else: if args.measure: end = time.time() print("Map generation done in", end - start, "seconds.") print("Finished!")
def gamemenu(): print("Witaj w AzeRPG!") while anstrue: print(""" 1.Przejdź do głównego menu 2.Stwórz postać 3.Wyjdź z gry """) ans=input("Co zamierzasz zrobić?") if ans =="1": print("Witaj w głownym menu!") menu.mainmenu() elif ans =="2": hero.chooseclass() elif ans =="3": print("See you soon!") exit()
def heromenu(choose, chooseclassB): print(f"Witaj,co chcesz teraz zrobić?") anstrue = True while anstrue: print(""" 1. Zobacz swoje statystyki 2. Rozdaj punkty umiejętności 3. Przejrzyj ekwipunek 4. Zmień ekwipunek 5. Wróć """) ans = input() if ans == "1": print("Twoje statystyki") if choose == "1": print("Twoje statystyki wynoszą:") chooseclassB.printwarriorstats() elif choose == "2": print("Twoje statystyki wynoszą:") chooseclassB.printmagestats() else: heromenu(choose2) exit() elif ans == "2": print("Rozdawanie punktów statystyk") #system dodawania punktów z przelicznikami exit() elif ans == "3": print("Owierasz swoją skrzynię...") inventory.openbag() exit() elif ans == "4": print("Tyle wszystkiego, że nie wiesz w co się ubrać!") inventory.changeeq exit() elif ans == "5": print("Wracasz do menu") menu.mainmenu() exit() else: print('Wybierz wartosc 1-4')
import csv import sys import core from menu import mainmenu import orbit from orbit import get_orbit, update_ta get_input = mainmenu() if get_input is True: with open("data.csv", "w") as csvfile: writer = csv.writer(csvfile) now = core.get_now(formatted=False) hour = now[0] year = now[1] while hour < 8759: # "For year 0" - basically does only a year's worth of calculations, because anything more is redundant now = core.get_now(formatted=False) hour = now[1] year = now[0] update_ta(hour) orbit = get_orbit() ta: float = orbit[5] writer.writerow([hour, ta]) core.clock_tick() else: sys.exit()
import time import menu menu.mainmenu() valinta = menu.retry(menu.valinta(),1,4) while valinta in range (1,5,1): if valinta == 4: menu.end() quit() if valinta == 3: menu.credits() valinta=menu.valinta() if valinta == 2: menu.info() valinta=menu.valinta() if valinta == 1: menu.menu1() valinta = 0 noppavairandom = menu.retry(menu.valinta(),1,2) if noppavairandom == 1: allstats=menu.menu1_1() if noppavairandom == 2: allstats=menu.menu1_2() abilityscore = menu.menu2(allstats)
import menu menu.mainmenu()
def getmenu(self): if not self.menu: from menu import mainmenu self.menu = mainmenu(self) return self.menu
def main(): run.mainmenu()
# Program utama Tugas Besar 2 Aljabar Geometri import os import menu import make import menutransform as mt import print as pt import numpy as np import pygame from OpenGL.GLUT import * from OpenGL.GL import * from OpenGL.GLU import * from pygame.locals import * os.system('cls') dimension = menu.mainmenu() #Menerima input dimensi yang diinginkan oleh user if (dimension != 0): Mat = make.shape(dimension) if (dimension == 2): pt.displayWindow2D() pt.Print2D(np.transpose(Mat)) mt.menu(dimension, Mat) else: #dimension == 3D pt.displayWindow3D() pt.Print3D(np.transpose(Mat)) mt.menu(dimension, Mat)