|
|
@ -3,10 +3,23 @@ package PingPong; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.event.KeyEvent; |
|
|
|
|
|
|
|
public class Paddle { |
|
|
|
public void draw(Graphics g) { |
|
|
|
} |
|
|
|
public class Paddle extends Rectangle{ |
|
|
|
int y1; |
|
|
|
int y2; |
|
|
|
int id; |
|
|
|
|
|
|
|
Paddle(int x, int y, int width, int height, int id) { |
|
|
|
//super(x, y, width, height); |
|
|
|
this.x = x; |
|
|
|
if (id == 1) { |
|
|
|
y1 = y; |
|
|
|
} else if (id == 2) { |
|
|
|
y2 = y; |
|
|
|
} |
|
|
|
this.width = width; |
|
|
|
this.height = height; |
|
|
|
this.id = id; |
|
|
|
} |
|
|
|
public void pressed(KeyEvent e) { |
|
|
|
} |
|
|
|
|
|
|
|