Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1

Chapter 23 ■ Completing the gameplay Code and player proofing your event handling


As you can see highlighted in Figure 23-4, the setupQ1S2gameplay() method code is very similar, other
than a pickS2 Random object and Image references and, of course, the Button labels for the correct and
incorrect answers.


Figure 23-4. Add correct and incorrect answers to Q1S2 Button objects, which as you can see is similar to the
Q1S1 method


Figure 23-3. Use a Run ➤ Project work process and test your Q1S1 answers and scoring logic before moving
on to Q1S2

Free download pdf