I am creating a text based game where I need to move from Room to Room and pick up items before finishing in a final room. I have written out my rooms and the directions to pass between them below. How do I make the items be in the rooms, how do I then pick them up, how do I print out that you are now in ['current room' , you have ['items'] . Then when you're reach the control room with all the items you win the game. otherwise you lose.
I am unsure how to make that reflect in the code. I have included the storyboard and pseudocode for what I'm trying to accomplish.
Please help explain what I need here.
Text Based Game.py ) ~ main.py main Project main.py X Project Text Based Game.py ~/PycharmProjects/Text Ba 1 9# Vincent Emery A 2 A 33 X 1 >venv main.py > lilli External Libraries #starting room Scratches and Consoles rooms = { Hallway' : {'West' : 'Launch Pad', 'North' : 'Control Room' , 'South': 'Hero Lounge' , 'East': 'Hero Gym'}, Launch Pad' : {'East' : 'Hallway'}, 'Hero Lounge' : {'North' : 'Hallway' , 'East' : 'Hero Locker Room' , 'West': 'Tool Closet'}, 9 Tool Closet' : {'East' : 'Hero Lounge'}, 10 'Hero Locker Room' : {'West' : 'Hero Lounge'}, 11 'Hero Gym' : {'West' : 'Hallway' m, 'North': 'Hero Secret Room'}, 12 'Hero Secret Room' : {'South' : 'Hero Gym'}, 13 'Control Room' : {'South' : 'Hallway', 'East' : 'Supply Room' } 14 15 16 17 18 # starting room 19 current_room = rooms [ ' Hallway' ] 20 print( 'Your current room is: ', current_room) 21 22 print ('Please type your next command from the following: South, North, West, Exit' ) #commands for moving 23 move = input () #user selects which Letter to use. 24 while True Problems: Current File 36 Project Errors main.py ~/PycharmProjects/Text Based Game.py 36 problems A Class 'set' does not define '_setitem_', so the '' operator cannot be used on its instances :83 A Class 'set' does not define '_getitem_', so the '' operator cannot be used on its instances :85 A PEP 8: E265 block comment should start with '# ' :4 A PEP 8: E203 whitespace before ',' :6 A PEP 8: E203 whitespace before ',' :6 Structure A PEP 8: E203 whitespace before ',' :6 A PEP 8: E203 whitespace before ',' :8 A PEP 8: E203 whitespace before ',' :11 A PEP 8: E203 whitespace before ',' :13 Favorites A PEP 8: E203 whitespace before ',' :20 A PEP 8: E261 at least two spaces before inline comment :22 . Run TODO Problems - Terminal Python Console Event Log 81:41 LF UTF-8 4 spaces Python 3.9 (Text Based Game.py)Text Based Game.py ) ~ main.py main Project 0zx Q - main.py X Project Text Based Game.py ~/PycharmProjects/Text Ba 24 A 2 A 33 X 1 >venv 25 #loop for room travel main.py 26 jif current_room == rooms [ ' Hallway ' ]: > lilli External Libraries 27 if move == 'Exit' : Scratches and Consoles 28 print ( ' Thank you for playing!') 29 elif move == 'South': 30 print ( 'You entered the Hero Lounge! ') 31 print (current_room [move ]) 32 elif move == 'North' : 33 print ("You've entered the Control Room") 34 35 gif current_room == rooms [ ' Hero Lounge' ]: 36 if move == 'Exit' : 37 print ( ' Thank you for playing! ') 38 elif move == 'East' : 39 print ("You're in the Hero Locker Room!") 40 print ( ' Type your next move!') 41 elif move == 'North' : 42 print ('You entered the Hallway! ' ) 43 HD print (' Enter your next move! ' ) 44 elif move == 'West' : 45 print ("You entered the Tool Closet!") 46 print (' Enter your next move!' ) 47 elif move != 'West, East, North, Exit' : 1.Q nnint(IInvalid Entnyl Tov Again! ! ) while True Problems: Current File 36 Project Errors main.py ~/PycharmProjects/Text Based Game.py 36 problems A Class 'set' does not define '_setitem_', so the '' operator cannot be used on its instances :83 A Class 'set' does not define '_getitem_', so the '' operator cannot be used on its instances :85 A PEP 8: E265 block comment should start with '# ' :4 A PEP 8: E203 whitespace before ',' :6 A PEP 8: E203 whitespace before ',' :6 Structure A PEP 8: E203 whitespace before ',' :6 A PEP 8: E203 whitespace before ',' :8 A PEP 8: E203 whitespace before ',' :11 A PEP 8: E203 whitespace before ',' :13 Favorites A PEP 8: E203 whitespace before ',' :20 A PEP 8: E261 at least two spaces before inline comment :22 . Run TODO Problems - Terminal Python Console Event Log 81:41 LF UTF-8 4 spaces Python 3.9 (Text Based Game.py)Text Based Game.py ) ~ main.py main Project main.py X Project Text Based Game.py ~/PycharmProjects/Text Ba 47 elif move != 'West, East, North, Exit' : A 2 A 33 X 1 >venv 48 print (' Invalid Entry! Try Again! ' ) main.py 49 > lilli External Libraries 50 Gif current_room == rooms [ ' Hero Locker Room' ]: Scratches and Consoles 51 if move == ' East' : 52 print ("You're in the Hero Lounge") 53 elif move == 'Exit' : 54 print (' Thank you for playing!') 55 56 elif move != 'West' : 57 print(' Invalid Entry! Try again! ' ) 58 59 #Sample function showing the goal of the game and move commands 60 def show instructions (: 61 #print the instructions for the user 62 print ( ' Super Villain Text Adventure Game' ) 63 print ("Collect & items, defeat the Villain and enter the Supply room to disarm the snow bong to win the game be buried 64 print ("Move commands: South, North, East, West") 65 print ("Add to Inventory: get 'item name' ") 66 67 items { 68 snow bomb' 69 'hero cape', 70 'pliers' , while True Problems: Current File 36 Project Errors main.py ~/PycharmProjects/Text Based Game.py 36 problems A Class 'set' does not define '_setitem_', so the '' operator cannot be used on its instances :83 A Class 'set' does not define '_getitem_', so the '' operator cannot be used on its instances :85 A PEP 8: E265 block comment should start with '# ' :4 A PEP 8: E203 whitespace before ',' :6 A PEP 8: E203 whitespace before ',' :6 Structure A PEP 8: E203 whitespace before ',' :6 A PEP 8: E203 whitespace before ',' :8 A PEP 8: E203 whitespace before ',' :11 A PEP 8: E203 whitespace before ',' :13 Favorites A PEP 8: E203 whitespace before ',' :20 A PEP 8: E261 at least two spaces before inline comment :22 . Run TODO Problems - Terminal Python Console Event Log 81:41 LF UTF-8 4 spaces Python 3.9 (Text Based Game.py)Text Based Game.py ) ~ main.py main Project main.py X Project Text Based Game.py ~/PycharmProjects/Text Ba 67 items { A 2 A 33 X 1 >venv 68 snow bomb, main.py 69 hero cape', > lilli External Libraries 70 'pliers' , Scratches and Consoles 71 'hero utility belt', 72 'hero boots', 73 blow torch', 74 ' hero suit 75 76 77 while True: 78 option = input("Would you Like to pickup the item [y]? ") 79 if Coption = in): 80 break 81 category = input("Which category? ") 82 if (category not in items) : 83 items[category] = 84 item_name = input ("Item name: ") 85 items[category] . append (item_name) 86 print ("Current Inventory:") 87 print (items) 88 89 90 print (show_instructions ()) while True Problems: Current File 36 Project Errors main.py ~/PycharmProjects/Text Based Game.py 36 problems A Class 'set' does not define '_setitem_', so the '' operator cannot be used on its instances :83 A Class 'set' does not define '_getitem_', so the '' operator cannot be used on its instances :85 A PEP 8: E265 block comment should start with '# ' :4 A PEP 8: E203 whitespace before ',' :6 A PEP 8: E203 whitespace before ',' :6 Structure A PEP 8: E203 whitespace before ',' :6 A PEP 8: E203 whitespace before ',' :8 A PEP 8: E203 whitespace before ',' :11 A PEP 8: E203 whitespace before ',' :13 Favorites A PEP 8: E203 whitespace before ',' :20 A PEP 8: E261 at least two spaces before inline comment :22 . Run TODO Problems - Terminal Python Console Event Log 81:41 LF UTF-8 4 spaces Python 3.9 (Text Based Game.py)AutoSave O OFF wa Story Board Text based game - Saved to my Mac Home Insert Draw Design Layout References Mailings Review View ? Tell me Share Comments snhu IT 140 Design Document Template Instructions Fill out the sections below. Be sure to remove the bracketed text before submitting your Design Document. Vincent Emery Storyboard (Evil The evil villain Captain Snowman has captured the control center of the Hero Cave. He has set a snow bomb that will detonate in 1 hour in the supply closet causing the entire city to be covered in 30 feet of snow. You have to collect the pieces to your hero suit, bomb defusing instructions, the needed tools to defuse the bomb and a blow torch to melt Captain Snowman so you can enter the supply room to disarm the bomb. Control Room East Supply Room Villain: Object: Snow Bomb Captain Snowman West North South Hero Secret Room Item: Pliers Fast Hallway Launch Pad Item : Hero Cape North South West Fast Hero Gym Item: Hero Utility Belt West North South Tool Closet west Hero Lounge East Hero Locker Room Item: Item: Hero Boots Item: Hero Suit Blow Torch East West Page 1 of 3 507 words X English (United States) Focus E + 103%AutoSave O OFF w Story Board Text based game - Saved to my Mac Home Insert Draw Design Layout References Mailings Review View ? Tell me Share Comments snhu Pseudocode or Flowchart for Code to "Move Between Rooms" Print a list of commands for the user to use in order to move between rooms. Define Area = { launch pad' ; ('East': 'Hallway' , 'item': 'Hero Cape' 'Hallway': ('South': "Hero Lounge", 'East": 'hero gym' , 'North', 'Control Room") 'Hero Lounge': ('East": 'Hero locker Room' 'West", 'Tool Closet' , item in side room: Hero boots Hero Gym':_(north: hero secret room. Find item hero utility belt) 'Hero secret room: ( can move south to hero gym , Item in room is pliers) 'Hero Locker Room: (move 'west' to 'Hero Lounge' item found: hero suit) 'Tool Closet: (move 'east' to 'hero lounge' item inside room: blow torch 'Control room: move 'south' to 'hallway_ move 'East' to 'supply room' , Item found: Captain Snowman) Suppy Room: (move 'West' to 'control room' , item found: 'snow bomb') } E = East W = West S = South N = North #commands 'To Move East, Enter "East". "To Move West, Enter "West".' "To move south, enter "South".' "to move north, enter "North".| To add to inventory type add 'item name' #want the hero to start in the lounge area. Starting Room = Hero Lounge List the game instructions for the user when they enter 'z' Print ('what next?' , user input) Player moves in direction of corresponding Letter entered. Print (status update on user progress after each turn) When a player enters into a room with an item except control room and supply room prompt to add item to inventory Print ('add item?') If player goes to the control room before getting all items - captain snowman and snow bomb then Page 2 of 3 507 words X English (United States) Focus E E + 103%