diff --git a/Group_game/game.py b/Group_game/game.py index 0e166f222945a8b2d0fe5845798204573e37d0d7..f3ae015ecd819bfb93913dcfd6dd4c3b27ce263e 100644 --- a/Group_game/game.py +++ b/Group_game/game.py @@ -16,6 +16,7 @@ global current_level gas_starttime = "" time_penalty = False + def list_of_items(items): time.sleep(0.1) new_list = "" @@ -381,7 +382,9 @@ def main(): if location_boileroom["valve_open"]: gastime = current_time - gas_starttime gastime_left = 180 - gastime.total_seconds() - if gastime_left < 0: + if time_penalty: + gastime_left = gastime_left - 300 + if gastime_left <= 0: print("OH NO! The floor was filled with gas and you died") break # Display game status (room description, inventory etc.) diff --git a/Group_game/player.py b/Group_game/player.py index 51d27083afc3190398dc693f358f0bf1940fa609..e234b6c6bc15b6e8b34b6b171d6808712ce4809a 100644 --- a/Group_game/player.py +++ b/Group_game/player.py @@ -1,7 +1,7 @@ from items import * from map import * -inventory = [item_key] +inventory = [] # Start game at the centre current_room = locations["centre"]