What should program do if the player enters valid direction


Problem

Here is the scenario. user works for a small company that creates text-based games. user has been asked to pitch an idea to your team for a text-based adventure game with a theme and environment of users choice. users game must include different rooms, items, and a villain. The basic gameplay will require the player to move between different rooms to gather all of the items. A player wins the game by collecting all the items before encountering the villain. The player will have two options for commands in the game: moving to a different room, and getting an item from the room they are in. Movement between rooms happens in four simple directions: North, South, East, and West.

A. pseudocode or a flowchart that logically outlines the steps that will allow the player to move between rooms Be sure to address the following:

a. What input do I need from the player? How will I prompt the player for that input? How will I validate the input?
b. What should the program do if the player enters a valid direction? What output should result?
c. What should the program do if the player enters an invalid direction? What output should result?
d. How will the user control the program flow with decision branching and loops?

B. Create pseudocode or a flowchart that logically outlines the steps that will allow the player to get the item from the room they are in and add it to their inventory. Be sure to address the following:

a. What input do I need from the player? How will I prompt the player for that input? How will I validate the input?
b. What should the program do if the player enters a valid item (the item in their current room)? What output should result?
c. What should the program do if the player enters an invalid item (an item not in their current room)? What output should result?
d. How will I control the program flow with decision branching or loops?

I'll attach my pseudocode that I have so far. What I'm having trouble is for the movements and loops and branches part. I don't know how I can incorporate those into my pseudocode. Obviously for movements I should use Inputs correct?

Here is the pseudocode I have made so far

PRINT 'Welcome to the Haunted House Adventure!'

PRINT 'Collect all of the items to win!'

PRINT 'You'll need to collect an iron full helm, iron greaves, spiked iron platebody, iron cuisse, spiked shield, and a flaming sword to have a shot at killing the Ghost that haunts this house.'

DEFINE your current inventory and the rooms

PRINT '----------------------'

PRINT 'You are in the' current_room

PRINT current_inventory

IF the item is in the current_room

PRINT 'You see a' current_room

DEFINE main

inventory = []

Rooms Entrance room - East: Hallway

Hallway - West: Entrance room, East: Conservatory, North: Upstairs Hallways, South: Living room, item: Iron Greaves

Conservatory - North: Garage, West: Hallway, item: Spiked Iron Platebody

Garage - South: Conservatory, item: Iron Cuisse

Upstairs Hallway - South: Hallway, East: Master Bedroom, item: Spiked Shield

Master Bedroom - West: Upstairs Hallways, item: Flaming Sword

Living Room - North: Hallway, East: Basement, item: Iron Full Helm

Basement - West: Living Room

YOUR CURRENT ROOM IS THE ENTRANCE ROOM WHENEVER YOU START THE GAME

SHOW instructions

PRINT 'The instruction to move are: go north, go east, go south, go west. If you would like to see what is in your inventory type inventory.'

IF user types inventory

PRINT 'You're current inventory is....)<- should be all the items they have collected so far but how would I assign that value?
WHILE true.

Request for Solution File

Ask an Expert for Answer!!
Python Programming: What should program do if the player enters valid direction
Reference No:- TGS03228820

Expected delivery within 24 Hours