you will create a JavaFX GUI that represents the Scaryville State Home for the Criminally Insane.

The lunatics are taking over the asylum, and you are the last guard left. Your goal is to escape through the only exit door. This week, you will create a JavaFX GUI that represents the Scaryville State Home for the Criminally Insane.

Do the styling (coding of the details of the appearance of the GUI, such as colors and font sizes) using CSS, not the JavaFX setters, wherever possible. Make the start and finish squares appear different from other squares.

Grading for this lab will heavily weight the appearance of the GUI as well as its functionality. To get a good grade on this assignment, your GUI must both work correctly and look good.

Here are some of the classes you will need. This is not a complete list, and each class will need more than the basics I specify below:

  • A Coordinate class with an int row, an int column, and a char representing the value of the coordinate (this week, you will use four values for the Coordinates: blank (‘ ‘) for an empty space, W for a wall, S for the starting point, and E for the exit.) Provide getters and setters.
  • An AsylumMap class with a two-dimensional array of Coordinates but no GUI code.
  • A JavaFX GUI class called MapPane. Since the constructor for Scene takes a Pane as a parameter, this class should extend one of the Pane classes, most likely BorderPane. It should also contain a GridPane with a two-dimensional grid of Labels. One label in the GridPane corresponds to one Coordinate in the AsylumMap. Note this important distinction: the MapPane is for the the user interface while the AsylumMap is for data.

    The outer edges of the grid should consist of walls, except for one exit square. Use the square at row 1, column 1 as the starting point. When the game starts, squares that are not on the edges and are not the start square should be randomly set to wall and space squares (use about 25% walls.) Note that this does not guarantee that it is possible to escape the lunatics at all.

    You will also need a game reset button. This button creates a new random map. In my solution, the reset button is in an HBox contained in the MapPane. Write an event handler for the F10 key which does the same thing. The event handler handle a KeyEvent and find the key strokes using the the method getKeyCode(), which returns a KeyCode enum. Attack the event handler to the outer pane. Here are some key lines of code for the event handler.

    	final EventHandler keyEventHandler = new EventHandler() {			
    			
    		public void handle(final KeyEvent keyEvent) {
    			
    			if (keyEvent.getCode() == KeyCode.F10) {
Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency

Order your essay today and save 10% with the discount code tCPCOVID10