From 2b5154085bcb889fae1860fe38ec17a3859d08e6 Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Tue, 7 Feb 2023 22:56:34 +0100 Subject: [PATCH] update --- src/main/java/PingPong/CollisionChecker.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/PingPong/CollisionChecker.java b/src/main/java/PingPong/CollisionChecker.java index c2cf1ca..a38b4f8 100644 --- a/src/main/java/PingPong/CollisionChecker.java +++ b/src/main/java/PingPong/CollisionChecker.java @@ -9,4 +9,8 @@ public class CollisionChecker { public Boolean didTouchPaddle(Rectangle ball, Rectangle paddle) { return ball.intersects(paddle); } + + public Boolean didTouchLeftEdge(Integer ballXCoordinate) { + return ballXCoordinate <= 0; + } }