From fe9e3df7cb0268b6344aad9f049054a67bc7a1a0 Mon Sep 17 00:00:00 2001 From: Justin Senn Date: Wed, 8 Feb 2023 23:26:41 +0100 Subject: [PATCH] Update --- src/main/java/PingPong/GamePanel.java | 13 +++++++------ target/classes/PingPong/GamePanel$AL.class | Bin 731 -> 863 bytes target/classes/PingPong/GamePanel.class | Bin 4784 -> 4633 bytes 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/PingPong/GamePanel.java b/src/main/java/PingPong/GamePanel.java index d9e8dc6..13f574c 100644 --- a/src/main/java/PingPong/GamePanel.java +++ b/src/main/java/PingPong/GamePanel.java @@ -4,6 +4,7 @@ import javax.swing.*; import java.awt.*; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; +import java.util.Random; public class GamePanel extends JPanel implements Runnable { @@ -14,7 +15,7 @@ public class GamePanel extends JPanel implements Runnable { static final int PADDLE_HEIGHT = 100; public static final Dimension SCREEN = new Dimension(FRAME_WIDTH, FRAME_HEIGHT); - + Random random; Ball ball; Paddle paddle_1; Paddle paddle_2; @@ -154,12 +155,12 @@ public class GamePanel extends JPanel implements Runnable { paddle_1.pressed(e); paddle_2.pressed(e); } - } - public void keyReleased(KeyEvent e) { - paddle_1.released(e); - paddle_2.released(e); - } + public void keyReleased(KeyEvent e) { + paddle_1.released(e); + paddle_2.released(e); + } + } diff --git a/target/classes/PingPong/GamePanel$AL.class b/target/classes/PingPong/GamePanel$AL.class index 38e42d240d31e1d4ba150396f617a25fe2e26078..1cb4eccc087c6198022beceb9fa389bc77e1fd06 100644 GIT binary patch delta 334 zcmZXOJ5B;o6o$WZCm^{zDs?cv6$EG0h8ovkw6NAVl~!6=xd<8(BvE%jf|^L;0^EXy zJ0bqVD3X|){O57cf4=jX`^x)|@!LDl=3wBLZNW3oYKb+fM&UZSO3rSQi%#9TrQ&6B zd;HrN+0ki$QDj}Zp#_IHJ@8Tdj76`^4OBTcrFqRjmo4dHHpMnIRhlO^`8VoR(_Ni& z*St$z6#{8bjC;BIGwyKe4%wk0m(k4Ja-95J5=KL8NI8CCB}j;z_Kqr|3m?x^y4=26%NQ_y7O^ delta 179 zcmYj}yA8rX5JcatWd~=;Ax1L)uOTA@$t@sJ6csoC0Zot+Pyj6uKqZLr1&Cy3S2J&3 z$ustk&+QIWEU&(B^~N3Rx7((MBc&tl)@v(PJ#`X&aG)=3VN%b4p}e``kUK`S1GTqu l*H9Ue^rW@3sLLOn|LB}C6HyUUb&VPG;2EXdD>3aXa9;?a5+(ou diff --git a/target/classes/PingPong/GamePanel.class b/target/classes/PingPong/GamePanel.class index 5dd0342141a5aff2c4dc250021236cffd84c9a39..c989c252b32e45c3d69d2aca32b927aef2708bf7 100644 GIT binary patch delta 1018 zcmZvaNla8h5Qe|%!I@!Dh5-c)iVNzfh-@kmR3NB`q8P;B5|>FZ3IdAj!Ht6&gXn=5 z7Y@dgiN*sWi6)vDJ$NxO#)AjrzOT68hP(BK3C_X8>#o16>;K)K)c@~kX_z1JK0=TiO=MSlU#{ovJBE@ zrjjQ))TYB7M~0D(%{8%~a|1s)?nB1ZuTkb=s@7+Szq#w_a_oCx;E%#VtYpsW|oCXg;a! zNM$JuDMgUS7d;bY%;hUxIFxrh-!$r_>=}I5$YtoXZh4cW!|L*87TDd6*EDR^vTek$ zT_3^@9b!XJEMA`yI?nD<+0hTKtAubOWNA%|Kg(u`RWq^d9x}9`)#udXdkcVykzB==T?I@V;&U delta 1222 zcmZ{jTWnNS6o$XGTRYR4+V-?qBrSLupp+?{77?XI3KoQ>1r!>v29yaNWh@k-ScA8k zsF9lwa@6R9K_5&Y#zZWEL=BNw6Jt#DNd>$iUaMHVq2PaJ>M#$QN%mfApS}P8U;kS3 z!sOSd#NIvs=274Viyn-%M|)yy;FB^w<+u^u>TmSZ1OA;x-L&p|(u3(#`u=Sxf6(vW zmg@4iFA9UUhE)+x8ddr43p1Pi{(;Qq{un2yitt5{iS7xiOJ8e@_xambhXd<0@uwHFHQXpDA=Rm6g=9O0eU#YFWQ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