Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem. Create a simple text based adventure game. You explore the environment by issuing key commands. The computer produces textual descriptions of what you find.

Problem.
Create a simple text based adventure game. You explore the environment by issuing key commands. The computer produces textual descriptions of what you find. A discussion with example output can be found here: www.cabinetmagazine.org/issues/64/lucas.php
The game will be comprised of Room() constructs. I use the word construct because you can use strucs, objects, arrays, scalar variables, or parallel arrays for your main data structure. These constructs will have a room_name, room_description, room_id, occupied code, and 4 exit codes (N,S,E,W). You are free to add other variables as necessary. The room name always appears. The room description only appears the first time you enter that room or when you enter a Look command. The room id doesnt do anything unless you are using an array - in that case it is the element number of that room in the array. The occupied code just indicates if there is anything in that room. The exit codes are the commands you use to move to the next room. Allowable exits should always display along with the room title.
If the room is occupied, randomly select one of 4 monsters to spawn in the room. What, exactly, they do with your character is up to you. Not every room needs a monster! In fact, you are likely to not see some of the monsters on any given run. You DO NOT need to create a visual map.

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

Step: 3

blur-text-image

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions