From e7ecbe371524db7b3587ce2b0045de3174c2de3d Mon Sep 17 00:00:00 2001 From: Justin Senn Date: Mon, 6 Feb 2023 15:06:19 +0100 Subject: [PATCH] update --- src/main/java/Snake/Apple.java | 9 ++++++++- target/classes/Ball.class | Bin 237 -> 0 bytes target/classes/GameFrame.class | Bin 808 -> 0 bytes target/classes/GamePanel.class | Bin 702 -> 0 bytes target/classes/Paddle.class | Bin 243 -> 0 bytes target/classes/Score.class | Bin 240 -> 0 bytes 6 files changed, 8 insertions(+), 1 deletion(-) delete mode 100644 target/classes/Ball.class delete mode 100644 target/classes/GameFrame.class delete mode 100644 target/classes/GamePanel.class delete mode 100644 target/classes/Paddle.class delete mode 100644 target/classes/Score.class diff --git a/src/main/java/Snake/Apple.java b/src/main/java/Snake/Apple.java index 0721a32..7716cbe 100644 --- a/src/main/java/Snake/Apple.java +++ b/src/main/java/Snake/Apple.java @@ -1,7 +1,7 @@ package Snake; import java.awt.Point; - +import java.util.concurrent.ThreadLocalRandom; public class Apple @@ -14,4 +14,11 @@ public class Apple this.position = new Point(0, 0); } + public void selectGridPosition(int gridSize) + { + int x = ThreadLocalRandom.current().nextInt(0, gridSize); + int y = ThreadLocalRandom.current().nextInt(0, gridSize); + + } + } \ No newline at end of file diff --git a/target/classes/Ball.class b/target/classes/Ball.class deleted file mode 100644 index ba843c48044c1b1bafbdee026c0aae3b5a2dc2be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 237 zcmXYrO%8%E5QSg)5kVB<4cw^9q6tzTN%-+82XagO$BF0z`Tvyg?XR}AKOk~ruxSZl5nrA>Jf z3_&alv1_iWsE#~UM22yhah32&YX65;eUUeME!M+x2JcWdRVKDlPq-S+^xqi4p_TMu k6tonnOD<|XU{9Z54*~`}Qr*^9d!&9_+m!n)8;}|ZerrD}H~;_u diff --git a/target/classes/GameFrame.class b/target/classes/GameFrame.class deleted file mode 100644 index 95745410ccdf8cef5e0ce99b57efc0ff0379d2ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 808 zcmZuv>rN9v6#k}NXuC`=6cM~}5ijj3T}8YW{Xq#((_jNl4gMS2v5szco82uKAH}yY z(QTrM58y)?&y4?}kJA>u((l-4gzr@FcZ%cDR!Pf&H}pGlTj}oQ z^nAyjitZkkNnL_=jL}D15#MOZ$nub0pT{>~*BXIYKae^cA@dEUWqpMiq43%&UWjnf zN=CR$?uEm`VqvdfkFXSB#hQ$8+lp|-~%j;F}d=I5|U-W^QiF`@Zb=PsU*S8IMoX9CqfcI>T2 diff --git a/target/classes/GamePanel.class b/target/classes/GamePanel.class deleted file mode 100644 index 6a9c66b2e90c4edc1fe6332e3be7a24e02cd2a7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 702 zcmZ8e+iuf96r2+~apJlS2?g46E!PAj`~fYMLhLq1rmE5?6;IVRwP2C6mJ*xtTZo5B zAn^fwNk5>^sAn5v87%E(Ml*Ac&;I`N;}?K8=vt@{8hc_I9S9Z0HcV74)Ero-6WX7} z7xC4dpGo!6eRr)O)V8IP=?=l@bjKF#T;__i)b->vQgfLo8x1%*WtmXz1VMM)0HNvN z23j0(*dO}-K4CS~75=quS-AN(GZtKUm?2vldxH^kbjiZEy)ZoX0``ymA(Pl(;X%*y!aPuO>nzNnT2BOX1)VGY;dDp< diff --git a/target/classes/Paddle.class b/target/classes/Paddle.class deleted file mode 100644 index 0843ca5c8e6191a678c7d12e660ba7ac7cf447bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 243 zcmXYrOAdlS5JYSE2!aan2JX~_9Kg@U#1&B!4f_EmIs_p>^j@w^TzCKvW$XcGlIpJ4 z-AR4EuQz}tdxwPaSC>ECX$+=vyg?XR}A`i5?Qc`?0K5zg27mq zDHSi2h1lLMv8awbR)b+!COnULC6)g}qdv_GFovTtcOG0Zj-g{^hoHVa$Nw8Pd zfh|l_DL1!EChMKZ3MPZ3%0;mkwbJp<=rAK^2r}}#g;qg}b l5MSPlwZkbk8E_^~(1U>mpH-K2YnL@JZ->2SSfABG_yc|}E4}~#