From 1e6228040ae987f7674dbb23f3e1687a723dd31d Mon Sep 17 00:00:00 2001 From: Ahmed Yusuf <yusufa7@cardiff.ac.uk> Date: Wed, 26 Oct 2022 15:45:31 +0100 Subject: [PATCH] small changes --- Group_game/game.py | 6 ++---- Group_game/leaderboard.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Group_game/game.py b/Group_game/game.py index 47d75ba..e1ff59b 100644 --- a/Group_game/game.py +++ b/Group_game/game.py @@ -205,11 +205,9 @@ def unlock_door(): if current_room["name"] == "level 1 Escape door": if location_door["locked"]: if item_key in inventory: + totalseconds = (minutes * 60) + seconds + append_leaderboard(totalseconds, 'Times.csv') while True: - - totalseconds = (minutes*60)+seconds - append_leaderboard(totalseconds, 'Times.csv') - print("WELL DONE! You've escaped LEVEL 1 in a time of", minutes, "minutes and", seconds,"seconds") print("Type CONTINUE to begin the next level") response = input() diff --git a/Group_game/leaderboard.py b/Group_game/leaderboard.py index 8e001ee..871773b 100644 --- a/Group_game/leaderboard.py +++ b/Group_game/leaderboard.py @@ -65,7 +65,7 @@ def append_leaderboard(seconds_used,filename): #time_used = 20 minutes - time r file.close() print("Input 'Yes' or 'No'") - userinput = input("Would you live to view the leaderboard? : ") + userinput = input("Would you like to view the leaderboard? : ") userinput = userinput.lower() if userinput == 'yes': view_leaderboard(filename) -- GitLab