def leaderboards(): os.system("clear") # Load the leaderboard users = Leaderboard() users.readLeaderboard() print("===========================") print("= aMAZE =") print("===========================") print("= Leaderboards =") print("===========================") print() print() print("|# | Name | Score |") print("===========================") # Print the leaderboard print(users) print("1) Back ") next_Menu = None # Get the next menu from the user while next_Menu == None: next_Menu = get_ch().lower() if next_Menu == '1': os.system("clear") return MENU_MAIN else: next_Menu = None
def game_over(score): os.system("clear") print("===========================") print("= aMAZE =") print("===========================") print("= GAME OVER :( =") print("===========================") print("= Enter your Name =") print("= 10 Characters max =") print("===========================") # Get the users name name = input() # Update the leaderboard with the user that just played leaderboard = Leaderboard() leaderboard.readLeaderboard() leaderboard.addUser(name, score) leaderboard.writeLeaderboard()
def game_over(score): os.system("clear") print("===========================") print("= aMAZE =") print("===========================") print("= GAME OVER :( =") print("===========================") print("= Enter your Name =") print("= 10 Characters max =") print("===========================") # Get the users name name = input() # Update the leaderboard with the user that just played leaderboard = Leaderboard() leaderboard.readLeaderboard() leaderboard.addUser(name, score) leaderboard.writeLeaderboard()
def leaderboards(): os.system("clear") # Load the leaderboard users = Leaderboard() users.readLeaderboard() print("===========================") print("= aMAZE =") print("===========================") print("= Leaderboards =") print("===========================") print() print() print("|# | Name | Score |") print("===========================") # Print the leaderboard print(users) print("1) Back ") next_Menu = None # Get the next menu from the user while next_Menu == None: next_Menu = get_ch().lower() if next_Menu == '1': os.system("clear") return MENU_MAIN else: next_Menu = None