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; + } +}