Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am trying to create a text-based game in java but do not really know exactly where to start with the layout of my code

I am trying to create a text-based game in java but do not really know exactly where to start with the layout of my code and implementing the possible criteria for the code. I was wondering if someone could give me a general layout of all the criteria I would need for a text-based game and those criteria also being related to the design specifics for the text-based game. I just want a basic layout with the design specifics below. Also any possible guidance as to how I can easily implement the design specifics into a fully functional text based game

These are the criteria/design specifics for the game:

You may choose to call this main class Wonderland or another appropriate name

The Game class should have one main() method that creates an instance of the game and invokes it for game execution.

Necessary classes must include Locations, Items, Characters, Actions, Inventory, and Control

The Control class is the class that reads user input and checks the input against valid Actions.

If an Action is allowed, then the methods required to complete the action should be called on the objects involved (e.g., Action: take; object involved: flashlight).

Your game can contain any reasonable number of locations (rooms), with a minimum of five (5)

A common starting point is near the rabbit hole, and the ending point is somewhere in wonderland

Once you descend into the rabbit hole, you are unable to return

You should create a safe room to act as a gathering area for your treasures

You must portray a minimum of five (5) characters from the book

You must have a minimum of 12 items for the main character to interact with

You will need to establish a goal for the main character (e.g., Alice), and you must state this at the beginning of the game

The items, characters, location descriptions, and action words should be contained in separate text files, which are opened and loaded into the game at the start of the game.

From there, I think with multiple classes I will also have multiple tabs in my IDE. How do I connect the different classes that are put in different tabs to the current one with the main class? Basically, If someone can give me a basic layout of a text-based game that relates to the design specifics, as shown above, that would be great.

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

Students also viewed these Databases questions