Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I'm trying to build a text-based game using Python. My theme is the player is searching an old mansion, like the original resident evil

Hello,

I'm trying to build a text-based game using Python. My theme is the player is searching an old mansion, like the original resident evil game. Starting at the front foyer I want the player to search through the mansion collecting all of the items before finally encountering the main villain the zombie in the final room. If they fail to collect all of the items they die. I'm trying to create pseudocode or a flow chart that will act as my guide when creating the python code. Any ideas what either of these may look like? I posted the room/item layout I'm going for below as well as some expected outputs might look like. Since I'm new to coding it would be beneficial if there could be separate flow charts or pseudocodes for moving around the rooms and for picking up items that way I can follow along easier. Any help or guidance would be greatly appreciated!

image text in transcribed

Zombie Mansion Text Adventure Game

Collect 6 items to win the game, or be eaten by the zombie.

Move commands: go South, go North, go East, go West

Add to Inventory: get 'item name'

You are in the Main Hall

Inventory : []

---------------------------

Enter your move:

go North

You are in the Conservatory

Inventory : []

You see a Knife

---------------------------

Enter your move:

get Knife

Knife retrieved!

You are in the Conservatory

Inventory : ['Knife']

---------------------------

Enter your move:

get First Aid Kit

Can't get First Aid Kit!

You are in the Conservatory

Inventory : ['Knife']

---------------------------

Enter your move:

go South

You are in the Main Hall

Inventory : ['Knife']

---------------------------

Enter your move:

go East

You are in the Basement

Inventory : ['Knife']

You see a Key

---------------------------

Enter your move:

Key

Invalid Input!

You are in the Basement

Inventory : ['Knife']

You see a Key

---------------------------

Enter your move:

get Key

Key retrieved!

You are in the Basement

Inventory : ['Knife', 'Key']

---------------------------

Enter your move:

go South

You can't go that way!

You are in the Basement

Inventory : ['Knife', 'Key']

---------------------------

Enter your move:

go North

You are in the Secret Lab

Inventory : ['Knife', 'Key']

You see a Zombie NOM NOM...GAME OVER! Thanks for playing the game. Hope you enjoyed it.

East Conservatory Cemetery Item: Knife Item: First Aid Kit West North South Secret Lab Zombie! Front Foyer East Main Hall Item: Backpack North South West East Basement Item: Key West North South Kitchen East Bedroom Item: Body Armor Item: Gun West East Conservatory Cemetery Item: Knife Item: First Aid Kit West North South Secret Lab Zombie! Front Foyer East Main Hall Item: Backpack North South West East Basement Item: Key West North South Kitchen East Bedroom Item: Body Armor Item: Gun West

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago