Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA HELP A choose your own adventure game is a fairly old concept. Whether the game takes the form of a paper book, a computer

JAVA HELP A choose your own adventure game is a fairly old concept. Whether the game takes the form of a paper book, a computer program that outputs text, or a 3D RPG, the rules are the same. The player is given a prompt -- one part of a story. Then the user must select an option for how to proceed with the story. Depending on the option selected, the story can develop in different ways. Each of these points in the story can take the form of nodes in a graph. The edges between nodes represent the options the player can choose at each point in the story. Then, when the player selects an option (or edge), the next connected node reveals the next part of the story. - Define a class called StoryElement, which stores some text describing an event or place in the story. - Allow the StoryElement to contain a number of options (either more StoryElement objects, or a separate class containing a StoryElement object.) - Print the story text and list of options. Allow the user to select an option. - Repeat for the next StoryElement associated with that option.

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions