Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have no clue where to go from here. If I enter one of the movement commands it still gives me Invalid move Someone please
I have no clue where to go from here. If I enter one of the movement commands it still gives me "Invalid move"
IH dictionary for the simplified dragon text game \#The dictionary links a roon to other rooms. def main(): rooms ={ 'Great Hal2': { 'South': 'Bedroom' }, 'Bedroom': \{'North': 'Great Hal2', 'East': 'Cellar'\}, 'Cellar': \{'West': 'Bedroom'\} \} HPlailable movements movement comands =[ 'go North', 'go South', 'go East', 'go llest', 'exit' ] \#starting location current_room = 'Great HaLl' \#ame 2000 ;while True: \#Display current roon print("You are in \{\} ". format(courrent_room)) command = input ("Enter movement or exit:") print (command) \#user command exit if command = "exit" : current_room = "exit" print("Goodbye") break \#User command movement elif command in movement_commands: current_room = rooms[current_room[cormand ]] print("Hoving to:" [current_room[comnand]]) \#Invalid nove otse: print("Invalid move") Someone please show me what I'm missing. This assignment is already late.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started