delete paddle

master
universe 2022-05-30 14:43:18 -04:00 committed by bob
parent a8edbfbdf6
commit 772ac20d15
2 changed files with 0 additions and 20 deletions

View File

@ -8,7 +8,6 @@ This is a common technique among coders to keep things organized (and handy when
class Main {
public static void main(String[] args) {
new GameFrame();
}

View File

@ -1,19 +0,0 @@
/* Eric Li, ICS4U, Completed 5/29/2022
Ball class defines behaviours for the pong ball; it also adds no new functions and instead inherits its main functions from GenericObject */
import java.awt.*;
public class Paddle extends GenericObject {
public int INITIAL_SPEED = 6;
public static final int BALL_DIAMETER = 15;
public Paddle(int x, int y, int xDirection) {
super(x, y, BALL_DIAMETER, BALL_DIAMETER);
// set initial speed
super.setXDirection(INITIAL_SPEED * xDirection);
}
public void draw(Graphics g) {
g.setColor(Color.YELLOW);
g.fillRect(x, y, BALL_DIAMETER, BALL_DIAMETER);
}
}