Browse Source

update

main
fdai4616 2 years ago
parent
commit
22e98a7a49
  1. 11
      src/main/java/PingPong/GamePanel.java
  2. 3
      src/main/java/PingPong/Paddle.java
  3. BIN
      target/classes/PingPong/GamePanel.class
  4. BIN
      target/classes/PingPong/Paddle.class
  5. BIN
      target/classes/PingPong/Score.class

11
src/main/java/PingPong/GamePanel.java

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

3
src/main/java/PingPong/Paddle.java

@ -12,4 +12,7 @@ public class Paddle {
public void released(KeyEvent e) { public void released(KeyEvent e) {
} }
public void move() {
}
} }

BIN
target/classes/PingPong/GamePanel.class

BIN
target/classes/PingPong/Paddle.class

BIN
target/classes/PingPong/Score.class

Loading…
Cancel
Save