Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Group Project
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ahmed Yusuf
Group Project
Commits
78dae183
Commit
78dae183
authored
2 years ago
by
Ahmed Yusuf
Browse files
Options
Downloads
Patches
Plain Diff
few changes
parent
0211f8aa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Group_game/game.py
+4
-1
4 additions, 1 deletion
Group_game/game.py
Group_game/player.py
+1
-1
1 addition, 1 deletion
Group_game/player.py
with
5 additions
and
2 deletions
Group_game/game.py
+
4
−
1
View file @
78dae183
...
...
@@ -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.)
...
...
This diff is collapsed.
Click to expand it.
Group_game/player.py
+
1
−
1
View file @
78dae183
from
items
import
*
from
map
import
*
inventory
=
[
item_key
]
inventory
=
[]
# Start game at the centre
current_room
=
locations
[
"
centre
"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment