subject

Def player_stats(): print('Inventory: []')
print('')
print("Enter your move:\n")

rooms = {
'great hall': {
'north': 'bedroom',
'south': 'dining room',
'east': 'kitchen',
'west': 'library',
'contents': [],
'name': 'Great Hall',
'text': 'You see no items'},
'library': {
'name': 'library',
'east': 'great hall',
'text': 'You see a book',
'contents': 'book'},
'dining room': {
'name': 'dining room',
'text': 'You see a shield',
'north': 'great hall',
'east': 'cellar',
'contents': 'shield'},
'bedroom': {
'name': 'bedroom',
'text': 'You see fire',
'south': 'great hall',
'east': 'bathroom',
'contents': 'fire'},
'bathroom': {
'name': 'bathroom',
'text': 'You see a helmet',
'west': 'bedroom',
'contents': 'helmet'},
'cellar': {
'name': 'cellar',
'west': 'dining room',
'contents': 'Armor'},
'dungeon': {
'text': 'You see no items',
'name': 'dungeon',
'south': 'kitchen'},
'kitchen': {
'name': 'kitchen',
'text': 'You see raw beef',
'north': 'dungeon',
'west': 'great hall',
'contents': "raw beef"}
}

directions = ['north', 'south', 'east', 'west']
inventory = []
# output the player for instructions
current_room = rooms['great hall']
# If the player wants to exit the game
# loop for moving between rooms
# loop for moving between rooms
while True:
print()
print('You are in {}.'.format(current_room['name']))< br /> print(current_room['text'])
command = input('What do you do?\n').strip()
if current_room['contents']:
print("In the room are: {}.".format(', '.join(current_room['contents'])))< br /> if command in directions:
if command in rooms:
current_room = rooms[current_room[command]]
else:
print("You can't go that way.")
elif command. lower() in (exit, Exit):
break
elif command. lower().split()[0] == 'get':
item = command. lower().split()[1]
if item in current_room['contents']:
current_room['contents'].remove(ite m)
inventory. append(item)
else:
print("I don't see that here.")
elif command. lower().split()[0] == 'drop':
item = command. lower().split()[1]
if item in inventory:
current_room['contents'].append(ite m)
invenotry. remove(item)
else:
print("You aren't carrying that.")
else:
print("I don't understand that command")

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
Companies that implement and apply an information system effectively can create
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
You can apply several different worksheet themes from which tab?
Answers: 1
question
Computers and Technology, 24.06.2019 03:40
4. does the kernel phenotype distribution support the idea that the cob is the result of a dihybrid cross? what information supports your answer? if a dihybrid cross (i.e. f1 to f2 of standard mendelian crosses) is not indicated what conditions might contribute to this finding.
Answers: 2
You know the right answer?
Def player_stats(): print('Inventory: []')
print('')
print("Enter your move:\n")
<...
Questions
Questions on the website: 13722367