public class CS15Paddle
extends java.lang.Object
Constructor and Description |
---|
CS15Paddle(boolean isLeftPaddle)
Creates a new paddle in the pong game.
|
Modifier and Type | Method and Description |
---|---|
void |
checkCollision(CS15Ball ball)
Checks if the paddle instance is colliding with a ball.
|
void |
moveDown()
Moves the paddle down incrementally.
|
void |
moveUp()
Moves the paddle up incrementally.
|
public CS15Paddle(boolean isLeftPaddle)
isLeftPaddle
- if true, the paddle will be on the left side of the
game - if false, the paddle will be on the right side
of the gamepublic void checkCollision(CS15Ball ball)
ball
- CS15Ball instance to check collision withpublic void moveDown()
public void moveUp()