Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • c22027697/group-project
1 result
Show changes
Commits on Source (2)
......@@ -372,8 +372,8 @@ def main():
# Main game loop
while True:
current_time = datetime.now()
time_taken = current_time - start_time
time_left = 1200 - time_taken.total_seconds()
time_used = current_time - start_time
time_left = 1200 - time_used.total_seconds()
if time_penalty:
time_left = time_left - 300
if time_left < 0:
......@@ -397,8 +397,12 @@ def main():
gas_starttime = datetime.now()
location_entrance["entered"] = True
if trap_door["open"]:
minutes = time_taken()[0]
seconds = time_taken()[1]
print()
print("WELL DONE! You have completed the escape room.")
print('You took', minutes, 'minutes and', seconds, 'seconds.')
print()
print("(game ending)")
break
print_room(current_room)
......
......@@ -37,7 +37,7 @@ def append_leaderboard(seconds_used,filename): #time_used = 20 minutes - time r
time = [round(minutes), round(seconds)]
print("Congrats, enter your name on the leaderboard!")
name = input("What's your name? :")
name = input("What's your name? : ")
print('Well done! '+name)
print(f'You escaped in {time[0]} minutes and {time[1]} seconds')
......@@ -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 live to view the leaderboard? : ")
userinput = userinput.lower()
if userinput == 'yes':
view_leaderboard(filename)
......
......@@ -9,7 +9,6 @@ import time
def drink_wine():
# need to add time deduction
counter = 0
x = ""
while counter < 3:
......@@ -56,8 +55,6 @@ def drink_wine():
counter += 1
time.sleep(4)
x = 3
# time_taken = time_taken - 360
# remove wine from inventory
return x
......