Assignment 5C: Level Map Creator. There are a variety of ways that game developers store their level layouts. One simple method is to associate level elements with certain symbols, and then storing them in a 2D grid inside a text file. We will use our knowledge of 2D arrays to create a very simple Level Map Creator tool. The program should prompt the user to enter a width and height for the level. Then it should initialize a 2D array and fill every element with the "*" symbol. Afterwards, the user should be given the following options via a menu: 1. Clear Level Re-initialize the 2D array and fill every element with the "*" symbol. 2. Add Platform Prompt the user to enter a starting point and length for the horizontal platform. Replace those elements in the 2D array with the "=" symbol. If the length is longer than the number of columns |(or out of bounds), notify the user that this is not possible. 3. Add Item Prompt the user to enter a column and row index. Replace that element in the 2D array with the "O" symbol. If the column and row index in outside the bounds of the array, notify the user that this is not possible. 4. Quit: End the program After completing the task, print the modified 2D array, If anything other than Quit is selected, display the menu again. Otherwise, tell the player "Good bye!" and stop. Hints: Since we're using a 2D array to represent the level map, we'll use its indexes for our level coordinates. 0,0 will be the top-left corner of the map, and will correspond to array[0][0]. Sample Output #1: [FYE Level Map Creator] Enter a level map width: 20 Enter a level map height: 6 ***: ***** *************** ******************** **** ********* **** *** ***** *************** ***** *************** options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 2 [Add Platform] Enter X Coordinate: 1 Enter Y Coordinate: 1 Enter Length: 5 ******************** *-===: ************* ************* **** *** ************* **** *** ********** *** **** *** ***** *************** Options 1. Clear Level 2. Add Platform 3. Add Items Options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 3 [Add Item] Enter X Coordinate: 30 Enter Y Coordinate: 30 This is not a valid location! ******************** *=====************** ******************** ******************** ******************** ***** *************** Options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 3 [Add Item] Enter X Coordinate: 3 Enter Y Coordinate: 0 ***0**** *= ********** **** ******************** ******************** ***** *************** ********** ********** Options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 2 [Add Platform] Enter X Coordinate: 3 Enter Y Coordinate: 1 Enter Length: 29 This platform won't fit in the level! ***o* *************** *- ************** ******************** ***** *************** ******************** ******************** Options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 1 [Clear Level] ***** *************** ******************** ******************** ******************** ******************** ******************** Ontions

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please help me to solve this problem. I'm currently using the Java language.

Assignment 5C: Level Map Creator. There are a variety of ways that game developers store
their level layouts. One simple method is to associate level elements with certain symbols, and
then storing them in a 2D grid inside a text file. We will use our knowledge of 2D arrays to
create a very simple Level Map Creator tool.
The program should prompt the user to enter a width and height for the level. Then it should
initialize a 2D array and fill every element with the "*" symbol. Afterwards, the user should be
given the following options via a menu:
1. Clear Level
Re-initialize the 2D array and fill every element with the "*"
symbol.
2. Add Platform Prompt the user to enter a starting point and length for the
horizontal platform. Replace those elements in the 2D array with
the "=" symbol. If the length is longer than the number of columns
|(or out of bounds), notify the user that this is not possible.
3. Add Item
Prompt the user to enter a column and row index. Replace that
element in the 2D array with the "O" symbol. If the column and row
index in outside the bounds of the array, notify the user that this is
not possible.
4. Quit:
End the program
After completing the task, print the modified 2D array, If anything other than Quit is
selected, display the menu again. Otherwise, tell the player "Good bye!" and stop.
Hints: Since we're using a 2D array to represent the level map, we'll use its indexes for
our level coordinates. 0,0 will be the top-left corner of the map, and will correspond to
array[0][0].
Sample Output #1:
[FYE Level Map Creator]
Enter a level map width: 20
Enter a level map height: 6
***:
***** ***************
********************
**** ********* **** ***
***** ***************
***** ***************
options
1. Clear Level
2. Add Platform
3. Add Items
4. Quit
Enter a choice: 2
[Add Platform]
Enter X Coordinate: 1
Enter Y Coordinate: 1
Enter Length: 5
********************
*-===:
*************
************* **** ***
************* **** ***
********** ***
**** ***
***** ***************
Options
1. Clear Level
2. Add Platform
3. Add Items
Transcribed Image Text:Assignment 5C: Level Map Creator. There are a variety of ways that game developers store their level layouts. One simple method is to associate level elements with certain symbols, and then storing them in a 2D grid inside a text file. We will use our knowledge of 2D arrays to create a very simple Level Map Creator tool. The program should prompt the user to enter a width and height for the level. Then it should initialize a 2D array and fill every element with the "*" symbol. Afterwards, the user should be given the following options via a menu: 1. Clear Level Re-initialize the 2D array and fill every element with the "*" symbol. 2. Add Platform Prompt the user to enter a starting point and length for the horizontal platform. Replace those elements in the 2D array with the "=" symbol. If the length is longer than the number of columns |(or out of bounds), notify the user that this is not possible. 3. Add Item Prompt the user to enter a column and row index. Replace that element in the 2D array with the "O" symbol. If the column and row index in outside the bounds of the array, notify the user that this is not possible. 4. Quit: End the program After completing the task, print the modified 2D array, If anything other than Quit is selected, display the menu again. Otherwise, tell the player "Good bye!" and stop. Hints: Since we're using a 2D array to represent the level map, we'll use its indexes for our level coordinates. 0,0 will be the top-left corner of the map, and will correspond to array[0][0]. Sample Output #1: [FYE Level Map Creator] Enter a level map width: 20 Enter a level map height: 6 ***: ***** *************** ******************** **** ********* **** *** ***** *************** ***** *************** options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 2 [Add Platform] Enter X Coordinate: 1 Enter Y Coordinate: 1 Enter Length: 5 ******************** *-===: ************* ************* **** *** ************* **** *** ********** *** **** *** ***** *************** Options 1. Clear Level 2. Add Platform 3. Add Items
Options
1. Clear Level
2. Add Platform
3. Add Items
4. Quit
Enter a choice: 3
[Add Item]
Enter X Coordinate: 30
Enter Y Coordinate: 30
This is not a valid location!
********************
*=====**************
********************
********************
********************
***** ***************
Options
1. Clear Level
2. Add Platform
3. Add Items
4. Quit
Enter a choice: 3
[Add Item]
Enter X Coordinate: 3
Enter Y Coordinate: 0
***0****
*=
********** ****
********************
********************
***** ***************
********** **********
Options
1. Clear Level
2. Add Platform
3. Add Items
4. Quit
Enter a choice: 2
[Add Platform]
Enter X Coordinate: 3
Enter Y Coordinate: 1
Enter Length: 29
This platform won't fit in the level!
***o* ***************
*-
**************
********************
***** ***************
********************
********************
Options
1. Clear Level
2. Add Platform
3. Add Items
4. Quit
Enter a choice: 1
[Clear Level]
***** ***************
********************
********************
********************
********************
********************
Ontions
Transcribed Image Text:Options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 3 [Add Item] Enter X Coordinate: 30 Enter Y Coordinate: 30 This is not a valid location! ******************** *=====************** ******************** ******************** ******************** ***** *************** Options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 3 [Add Item] Enter X Coordinate: 3 Enter Y Coordinate: 0 ***0**** *= ********** **** ******************** ******************** ***** *************** ********** ********** Options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 2 [Add Platform] Enter X Coordinate: 3 Enter Y Coordinate: 1 Enter Length: 29 This platform won't fit in the level! ***o* *************** *- ************** ******************** ***** *************** ******************** ******************** Options 1. Clear Level 2. Add Platform 3. Add Items 4. Quit Enter a choice: 1 [Clear Level] ***** *************** ******************** ******************** ******************** ******************** ******************** Ontions
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY