Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA -- IntelliJ In the Game constructor (Game Class), create a Scenario object, then get its startRoom and assign it to currentRoom. GAME CLASS

JAVA -- IntelliJ

In the Game constructor (Game Class), create a Scenario object, then get its startRoom and assign it to currentRoom.

GAME CLASS

""

public class Game { private Parser parser; private Room currentRoom; /**  * Create the game and initialise its internal map.  */  public Game() { createRooms(); parser = new Parser(); }

}

""

SCENARIO CLASS

""

public class Scenario { private ArrayList rooms; private Room startRoom; private Random random; /**  * Create a scenario  */  public Scenario() { random = new Random(); // Set up your rooms, exits, and items // Move code from Game.createRooms here // Set the start room // Create the rooms ArrayList and add your rooms to it } /**  * @return the start room for this scenario  */  public Room getStartRoom() { // complete this method } /**  * @return a random room from this scenario  */  public Room getRandomRoom() { // complete this method } }

""

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

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago