Question: Java Programming: A level configuration file specifies the size of the game area and the locations of the walls of a game. It is a

Java Programming:

A level configuration file specifies the size of the game area and the locations of the walls of a game. It is a text file of numbers separated by whitespace.

 Java Programming: A level configuration file specifies the size of the

- The first line in the file contains two integer values specifying the width and height of the game area. If there is additional data on this line, it may be ignored.

- The following lines (if any) specify the walls. A wall line contains contains four integer values: the first two are the x and y position of the upper left corner of the wall, the second

two are the x and y position of the the lower right corner of the wall. If there is additional data on this line, it may be ignored

The output of the text file would appear like this (without the f and s):

game area and the locations of the walls of a game. It

Write a method that takes in a text file that looks like this, parses through the lines, and returns the proper variables with associated values.

20 11 1 0 180 1 10 18 10 0 1 0 9 19 1 19 9 4 5 155 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!