a. MGMain.java.
b. GameController.java
c. GenericTile.java
Only electronic documents submitted via Canvas are acceptable. Handwritten and scanned documents are
not acceptable. Do not submit a hard copy of your assignment. Do not email your assignment to the course
instructor or grader. Late assignments will not be graded.
PROBLEM DESCRIPTION: The Maze Game is described fully in the accompanying Software Design Document
(SDD). In this assignment, the student shall create a maze composed only of tiles of the Generic Tile class. No
agent is created in this assignment.
The software created in this assignment shall align with the ware description provided in the Problem
Solution section of the SDD. Specifically, the MGMain class creates an instance of the GameController class,
and the GameController creates a 2-dimensional (2D) array of tiles of the GenericTile class. Each tile in the
Maze is identified by their row-column location, designated (x, y), with x and y ranging from 0 to [n-1] for an
n-by-n array.
SOFTWARE REQUIREMENTS:
R1. All software files shall begin with a comment block using the format in Figure 1.
R2. The GameController shall print out a summary of the maze (see Instructions).
R3. The GameController shall create an n-by-n array of tiles of the Generic Tile class.
R4. The GameController shall create the Maze only if n is an odd integer.
R5. The GameController shall identify the Start node as tile (0, [n-1]/2).
R6. The GameController shall identify the Goal node as tile (n-1, [n-1]/2).
TEST CASES: There are no formal test cases for this assignment, though the code output should follow the
instructions and reflect requirements R1-R6.
INSTRUCTIONS: Follow instruction in the Problem Description, and create a 5-by-5 array of tiles. Construction
of the maze shall be verified by printing out the location of each tile and the unlocked/locked (U/L) status of
each exit using the following format:/nTile (x, y) (N, S, E, W) status: (U/L, U/L, U/L, U/L).
Example for a tile at location (2, 4) having the North and West doors locked and the South and East doors
unlocked, the output would be: Tile (2, 4) (N, S, E, W) status: (L, U, U, L).
In addition, the GameController shall print out the number of rows and columns in the Maze (n), and the
location of the Start, (x, y), and Goal, (p, q) tiles, using the following format:
There are n rows and columns in the Maze. Start is at (x, y), and Goal is at (p, q).
Sample output for a 3-by-3 Maze:
Tile (0, 0) (N, S, E, W) status: (U, U, L, L).
Tile (0, 1) (N, S, E, W) status: (L, L, L, L).
Tile (0, 2) (N, S, E, W) status: (U, L, L, U).
Tile (1, 0) (N, S, E, W) status: (L, L, L, U).
Tile (1, 1) (N, S, E, W) status: (U, U, U, U).
Tile (1, 2) (N, S, E, W) status: (U, L, U, L).
Tile (2, 0) (N, S, E, W) status: (L, U, U, U).
Tile (2, 1) (N, S, E, W) status: (U, U, U, L).
Tile (2, 2) (N, S, E, W) status: (U, U, U, U).
There are 3 rows and columns in the Maze. Start is at (0, 1), and Goal is at (2, 1)./nThere are 3 rows and columns in the Maze. Start is at (0, 1), and Goal is at (2, 1).
QUESTIONS: There are no questions required for this assignment.
RUBRIC: Points will be earned per the grading rubric shown in Table 2.
Table 1: Grading Rubric
Deliverable
Initial comment block in all files (Figure 1)
Code compilation
Correct code structure per problem statement
Correct execution
//***
// Class:
// Name:
// Date:
//
Totals
Points
5
5
15
Figure 1: Comment Block Format
550
15
40
// Purpose:
//
Awarded
// Attributes: >
//
// Methods:
// **
Fig: 1
Fig: 2
Fig: 3