From 79ea437ef4058bcb0615e8f35ade1852974254f2 Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Wed, 8 Feb 2023 20:23:11 +0100 Subject: [PATCH] update --- src/main/java/PingPong/GamePanel.java | 6 +++++- target/classes/PingPong/Score.class | Bin 1695 -> 1743 bytes 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/PingPong/GamePanel.java b/src/main/java/PingPong/GamePanel.java index fb3af78..47662f6 100644 --- a/src/main/java/PingPong/GamePanel.java +++ b/src/main/java/PingPong/GamePanel.java @@ -28,6 +28,7 @@ public class GamePanel extends JPanel implements Runnable { + public void run() { @@ -59,7 +60,10 @@ public class GamePanel extends JPanel implements Runnable { ball = new Ball((FRAME_WIDTH/2)-(BALL_DIAMETER/2), ((FRAME_HEIGHT/2)-(BALL_DIAMETER/2)), BALL_DIAMETER, BALL_DIAMETER); } - + public void newPeddle() { + paddle_1 = new Paddle(0, (FRAME_HEIGHT/2)-(PADDLE_HEIGHT/2), PADDLE_WIDTH, PADDLE_HEIGHT, 1 ); + paddle_2 = new Paddle(FRAME_WIDTH-PADDLE_WIDTH, (FRAME_HEIGHT/2)-(PADDLE_HEIGHT/2), PADDLE_WIDTH, PADDLE_HEIGHT, 2 ); + } public class AL extends KeyAdapter { public void keyPressed(KeyEvent e) { diff --git a/target/classes/PingPong/Score.class b/target/classes/PingPong/Score.class index 015b82e0534806c07d0567995db6d5c51c069f1b..727ad8447a258f40ed07f02f9debe1b04d94d511 100644 GIT binary patch delta 648 zcmYL`O-~b16o#KWoifwu6bDLcOKCw=phZRNf{mIeP-#p>5kdR_MnR2f+Jq8VX#DsG zHj}v3xKOr2D2XPn+}Mp9{R8g&2W~W;p+=LLd(U~_^YNZ@Uq-$}tmg0cAA!@{uUijK znRM86Vk^Rh>9eJY#ku16%w!0YE}NK-+bw)@qIiCCCd7Uc21%Q4QuXJ@!f7%Fy*7Ou zsDB>K9#ljgxa;nSyRkM>s8-fY4lB&DYNb{!yETh`25o{2d0EwCrpeh1bHppD-hf5g zd!;h*GztPUL1&4~o?5y`)+iJgIag$pH3pVFi z^j-%(C0vE3l&CLODl4mF(z~`&Gg$T>>pA_dBI7;NGhS1Vhh%tJhe^!)p^rX6#FbE7 z6s(L!K<@6`E-Kf-iye%dW9<-0ZR7N86MZMF#*`mJo177JsT3we2ko-HeI#+XBurnc z5|^14&yV-}sy$2AEL9X&m|6JS`lpoBgxnn7BHo~9_yhg(oriQMzso>_tiVpN9N0Uz zh&DLdLYxcB;s(odi(dH}oMW{Pt(spRP?#uGu6x zqVY58EvclH;FxBNaqop1ITOO-xMl*a2p1PF%oUawXY=J!ThC}F+q&-RrNZo`QrRZq zy;Z~U1X;~#PD-EZQ+IQI!>zSbKh>@@C}@h(?VWMn`(=FUS+cp!ogjBL7rEzs^nF(= zUfqnF4-{iwuPGHxM?Lhm%v?xF