From 1e8d8e010bd8f38c7b0fa01bc1f2cec4cb6e348f Mon Sep 17 00:00:00 2001 From: Adriel <NuquiA@cardiff.ac.uk> Date: Wed, 26 Oct 2022 16:00:55 +0100 Subject: [PATCH] Bug fixes --- Group_game/Times.csv | 1 + Group_game/Timeslvl2.csv | 1 + Group_game/game.py | 3 +++ Group_game/leaderboard.py | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 Group_game/Times.csv create mode 100644 Group_game/Timeslvl2.csv diff --git a/Group_game/Times.csv b/Group_game/Times.csv new file mode 100644 index 0000000..9790dd2 --- /dev/null +++ b/Group_game/Times.csv @@ -0,0 +1 @@ +index,name,seconds \ No newline at end of file diff --git a/Group_game/Timeslvl2.csv b/Group_game/Timeslvl2.csv new file mode 100644 index 0000000..9790dd2 --- /dev/null +++ b/Group_game/Timeslvl2.csv @@ -0,0 +1 @@ +index,name,seconds \ No newline at end of file diff --git a/Group_game/game.py b/Group_game/game.py index e1ff59b..4a138e6 100644 --- a/Group_game/game.py +++ b/Group_game/game.py @@ -400,6 +400,9 @@ def main(): print() print("WELL DONE! You have completed the escape room.") print('You took', minutes, 'minutes and', seconds, 'seconds.') + + lvl2seconds = (minutes * 60) + seconds + append_leaderboard(lvl2seconds, 'Timeslvl2.csv') print() break diff --git a/Group_game/leaderboard.py b/Group_game/leaderboard.py index 871773b..5f91900 100644 --- a/Group_game/leaderboard.py +++ b/Group_game/leaderboard.py @@ -76,4 +76,4 @@ def append_leaderboard(seconds_used,filename): #time_used = 20 minutes - time r #Returns back to game.py - +append_leaderboard(244, 'Timeslvl2.csv') \ No newline at end of file -- GitLab