delete paddle
parent
a8edbfbdf6
commit
772ac20d15
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue