From b04197146700518841c771e65261534a786739eb Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Tue, 7 Feb 2023 22:54:24 +0100 Subject: [PATCH] update --- src/main/java/PingPong/CollisionChecker.java | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/main/java/PingPong/CollisionChecker.java diff --git a/src/main/java/PingPong/CollisionChecker.java b/src/main/java/PingPong/CollisionChecker.java new file mode 100644 index 0000000..6543814 --- /dev/null +++ b/src/main/java/PingPong/CollisionChecker.java @@ -0,0 +1,7 @@ +package PingPong; + +public class CollisionChecker { + public Boolean didTouchTopOrBottomEdge(Integer ballYCoordinate, Integer maxHeight) { + return ballYCoordinate <= 0 || ballYCoordinate >= maxHeight; + } +}