@ -25,17 +25,28 @@ public class GamePanel extends JPanel implements Runnable {
public void run() {
}
public void draw(Graphics g) {
score.draw(g);
paddle_1.draw(g);
paddle_2.draw(g);
ball.draw(g);
public void move() {
paddle_1.move();
paddle_2.move();
ball.move();
public void paint(Graphics g) {
image = createImage(getWidth(), getHeight());
@ -12,4 +12,7 @@ public class Paddle {
public void released(KeyEvent e) {