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
53f7e98bdc98885ff689302873605a1af5000391 to cb1ad63413f3a9345b9b68104c6a5a4fba0a6193
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
cb1ad63413f3a9345b9b68104c6a5a4fba0a6193
Select Git revision
Branches
main
Swap
Target
c22027697/group-project
Select target project
c22027697/group-project
1 result
53f7e98bdc98885ff689302873605a1af5000391
Select Git revision
Branches
main
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
working on trapdoor
· f1702055
Morgan Diment
authored
2 years ago
f1702055
Merge branch 'main' of
https://git.cardiff.ac.uk/c22027697/group-project
· cb1ad634
Morgan Diment
authored
2 years ago
cb1ad634
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Group_game/game.py
+4
-0
4 additions, 0 deletions
Group_game/game.py
Group_game/level_2.py
+1
-1
1 addition, 1 deletion
Group_game/level_2.py
with
5 additions
and
1 deletion
Group_game/game.py
View file @
cb1ad634
...
...
@@ -131,6 +131,8 @@ def print_menu(exits, room_items, inv_items):
time
.
sleep
(
0.2
)
if
current_room
==
trap_door
and
item_batteries
in
inventory
:
print
(
"
USE BATTERIES for LOCK to place the batteries in the electrical lock
"
)
if
current_room
==
trap_door
and
item_lock
[
"
batteries
"
]
==
True
:
print
(
"
OPEN TRAP DOOR to open the trap door and exit out of it
"
)
print
(
"
What do you want to do?
"
)
...
...
@@ -267,6 +269,8 @@ def execute_command(command):
open_diary
(
current_room
[
"
items
"
])
elif
command
[
1
]
==
"
safe
"
:
open_safe
(
current_room
[
"
items
"
])
elif
command
[
1
]
==
"
trap door
"
:
open_trapdoor
()
else
:
print
(
"
open what?
"
)
...
...
This diff is collapsed.
Click to expand it.
Group_game/level_2.py
View file @
cb1ad634
...
...
@@ -66,7 +66,7 @@ def close_valve():
def
open_trapdoor
():
if
current_room
==
trap_door
:
if
item_lock
[
"
batteries
"
]:
if
item_
keycard
in
inventory
:
if
key
_
card
in
inventory
:
trap_door
[
"
open
"
]
=
True
else
:
print
(
"
You need a key card to open the lock
"
)
...
...
This diff is collapsed.
Click to expand it.