Question: Automated Pong! Create a JavaFX application that simulates a pong game (a ball bouncing from the left wall to the right wall and 2 'paddles'
Automated Pong! Create a JavaFX application that simulates a pong game (a ball bouncing from the left wall to the right wall and 2 'paddles' trying to hit it). 1. The balls should not bounce on the top or bottom of the frame. Use a random number to generate a Y value from 0- every time the ball hits the side. 2. Create 2 paddles that move (translate) with the ball as it is bouncing toward their side (left or right). For instance, if the ball is moving from left to right, have the right paddle move up/down toward the center location of where the ball will hit. Note: - You may want to change the X values to something like 20 - so that it looks like the balls are hitting the paddles rather than going through them.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
