java.lang.Object
project.pong.view.component.BallView
The BallView class represents the graphical view of the ball in the Pong game.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the current position of the ball.javafx.scene.shape.CircleGets the graphical representation of the ball.toString()voidUpdates the position of the ball view based on the ball model.
-
Constructor Details
-
BallView
Constructs a BallView object with the specified ball.- Parameters:
ball- The ball model object.
-
-
Method Details
-
getBallView
public javafx.scene.shape.Circle getBallView()Gets the graphical representation of the ball.- Returns:
- The Circle object representing the ball view.
-
getBallPosition
Gets the current position of the ball.- Returns:
- An ArrayList containing the x and y coordinates of the ball.
-
updatePosition
public void updatePosition()Updates the position of the ball view based on the ball model. -
toString
-