Browse Source

update

main
fdai4616 2 years ago
parent
commit
4103bce403
  1. 4
      src/main/java/PingPong/CollisionChecker.java

4
src/main/java/PingPong/CollisionChecker.java

@ -13,4 +13,8 @@ public class CollisionChecker {
public Boolean didTouchLeftEdge(Integer ballXCoordinate) { public Boolean didTouchLeftEdge(Integer ballXCoordinate) {
return ballXCoordinate <= 0; return ballXCoordinate <= 0;
} }
public Boolean didTouchRightEdge(Integer ballXCoordinate, Integer maxWidth) {
return ballXCoordinate >= maxWidth;
}
} }
Loading…
Cancel
Save