Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 23 ■ Completing the gameplay Code and player proofing your event handling

Figure 23-17. Declare an againButton Button object at the top of your class and add it to your SceneGraph
root object


Instantiate and configure againButton in createBoardGameNodes() at X, Y (200, -400) with a size of
(300, 150) and use a 34 -point Arial Black font, as shown in Figure 23-18. Label it Let’s Play Again because it
triggers a round of gameplay.


Figure 23-18. Instantiate and configure againButton in the createBoardGameNodes() method and use a
large size and font

Free download pdf