def game(): introscr = intro.first_screens() inputs = introscr.menu1() #will return integer value of choices. savechoices = Savecatch.Game_save() if inputs == 4: intro.tutorial() sys.exit() elif inputs == 3: print "Bye!!" time.sleep(2) sys.exit() elif inputs == 2: all_data = savechoices.load_game() #how to exit gracefully? time.sleep(2) clear.clrscr() elif inputs == 1: clear.clrscr() all_data = create_monster() start_game(all_data) intro.title_screen(0) game()
else: print "Not a valid option." menuchoices3(mons_stats) time.sleep(3) return mons_stats def game(): introscr = intro.first_screens() inputs = introscr.menu1() #will return integer value of choices. savechoices = Savecatch.Game_save() if inputs == 4: intro.tutorial() sys.exit() elif inputs == 3: print "Bye!!" time.sleep(2) sys.exit() elif inputs == 2: all_data = savechoices.load_game() #how to exit gracefully? time.sleep(2) clear.clrscr() elif inputs == 1: clear.clrscr() all_data = create_monster() start_game(all_data) intro.title_screen(0) game() intro.title_screen(1) game()