From 4103bce4039992430684a8d03fa23e6719d1e99c Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Tue, 7 Feb 2023 22:57:05 +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 a38b4f8..59c3ed0 100644 --- a/src/main/java/PingPong/CollisionChecker.java +++ b/src/main/java/PingPong/CollisionChecker.java @@ -13,4 +13,8 @@ public class CollisionChecker { public Boolean didTouchLeftEdge(Integer ballXCoordinate) { return ballXCoordinate <= 0; } + public Boolean didTouchRightEdge(Integer ballXCoordinate, Integer maxWidth) { + return ballXCoordinate >= maxWidth; + } + }