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
Compare revisions
3a671e9e8fb74f5dbb56c142a630d6f2fb973943 to 2af9004f1bde1ced2c6571c8257064bf71aba87b
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
c22027697/group-project
Select target project
No results found
2af9004f1bde1ced2c6571c8257064bf71aba87b
Select Git revision
Swap
Target
c22027697/group-project
Select target project
c22027697/group-project
1 result
3a671e9e8fb74f5dbb56c142a630d6f2fb973943
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
few changes
· 78dae183
Ahmed Yusuf
authored
2 years ago
78dae183
Merge branch 'main' of
https://git.cardiff.ac.uk/c22027697/group-project
· 2af9004f
Ahmed Yusuf
authored
2 years ago
2af9004f
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
View file @
2af9004f
...
...
@@ -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
View file @
2af9004f
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.