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
f1702055
Commit
f1702055
authored
2 years ago
by
Morgan Diment
Browse files
Options
Downloads
Patches
Plain Diff
working on trapdoor
parent
967a2088
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
-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
+
4
−
0
View file @
f1702055
...
...
@@ -130,6 +130,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?
"
)
...
...
@@ -263,6 +265,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
+
1
−
1
View file @
f1702055
...
...
@@ -62,7 +62,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.
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