Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 2: Programming (15 pts) The goal of this assignment is to develop a program that generates a dungeon, which is a two-dimensional grid space

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Part 2: Programming (15 pts) The goal of this assignment is to develop a program that generates a dungeon, which is a two-dimensional grid space (x, y). By reading monster's information from a file monsters are allocated to the grid cells. The user can shift and shuffle the monsters. Download the following files and use them for this assignment. Do not change any content of the following files .Assignment8.java Monster java dungeonData.txt dungeon Data2.txt The last two files are input files (text) that will be read from Assignment8 class. Save all files in the same folder. You will be creating a class called Dungeon. This class should be defined in a file named "Dungeon-Java". The class will contain a two-dimensional array called "monsters" of Monster objects. It also has two static variables, gridWidth and gridHeight. (3 pt) Dungeon -monsters: Monster [ + gridwidth: int + gridHeight: int + Dungeon (int width, int height) + updateMonster (int x, int y, Monster m) -swap (int xl, int yl, int x2, int y2) + shuffle () + shift (char command) void + printInfo () void void : void : Strin As shown in the image below, the x direction is from left to right, and the y direction is from top to down. The left top is represented as (x, y)-(0,0). The image shows a case in which the grid size is 5 by 5. All monster can move in four directions by reading a corresponding key; up ('w), left (a'), down ('s) and right ('d'). Before starting the Dungeon class, read the code of Assignment8.java and Monster.java carefully. Without the knowledge of methods of them or tasks in the Assignment8, it is impossible to complete this assignment

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago