Question: Describtion ****MAZE GAME IN JAVA (Eclipse)**** (Please follow all directions) You should create a maze game. The aim of the game is to get out
Describtion
****MAZE GAME IN JAVA (Eclipse)****
(Please follow all directions)
You should create a maze game. The aim of the game is to get out of the maze. The game will read inn maze from a text file with the format specified below. I'm going to lay out some such as mazes, but you can feel free to make your own as well. Here is an example of a file that specifies a maze:
7
6
##### - #
# * # # #
# # #
### # #
# #
Files that specifies a maze should start with two numbers on each line. The numbers indicate the width and height of the maze. Example file indicates that the maze will be 7 squares wide and 6 squares high. Then comes the maze. Each line of the text file is a row in the maze and each character in the text file marks what should be included in a particular cell in the maze. "#" Character marks a wall, a blank character marks an opening (hallway), "*" indicates where the player starts and "-" marks the end. An example of how the game might look like based on sample file stated above are given in Figure 1. The left is so game starts and the right is such a game is right before the player wins.


Tasks:
Create an abstract class Maze Route representing a route in the maze. All maze routes
To save his position on the board (x and y coordinates). The class will also declare two
abstract methods: A method of moving the player to the route, and a
method that returns a reference to the appearance of the route.
Then Make concrete subclasses of the three types of routes Wall, Hallway and output(end).
If the player moves to the end the player has won and the game will end. You choose if the look of the routes are easy
forms like javafx.scene.shape.Rectangle, or more advanced selfdrawn forms with Canvas,
or pictures that you show off with ImageView objects.
After that, create a class player that stores the position of the player in the board
and create a method that reads a text file and create a two-dimensional array of maze routes
based on the scanned file.
Create a Java FX main class that displays the maze.
Then make a Event Handler
direction of the arrow. Then finish by
register keylistener in Scene object to let it be applicable for the entire game.
M
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
