Question: Next, you will develop code to meet the required functionality, by prompting the player to enter commands to move between the rooms or exit the
Next, you will develop code to meet the required functionality, by prompting the player to enter commands to move between the rooms or exit the game. To achieve this, you must develop the following:
A gameplay loop that includes:
Output that displays the room the player is currently inDecision branching that tells the game how to handle the different commands. The commands can be to either move between rooms such as go North, South, East, or West or exit.
If the player enters a valid move command, the game should use the dictionary to move them into the new room.If the player enters exit the game should set their room to a room called exitIf the player enters an invalid command, the game should output an error message to the player input validation
A way to end the gameplay loop once the player is in the exit room
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
