diff --git a/src/test_/java/CollisionCheckerTest.java b/src/test_/java/CollisionCheckerTest.java index 10da0f9..277d0e1 100644 --- a/src/test_/java/CollisionCheckerTest.java +++ b/src/test_/java/CollisionCheckerTest.java @@ -2,6 +2,8 @@ import PingPong.CollisionChecker; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import java.awt.*; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -48,4 +50,16 @@ public class CollisionCheckerTest { //assert assertFalse(result); } + @Test + void WhenBallRectangleIntersectsWithPaddleRectangle_didTouchPaddle_ReturnsTrue() { + // arrange + Rectangle ballRectangle = new Rectangle(1,1,1,1); + Rectangle paddleRectangle = new Rectangle(1,1,5,5); + + //act + Boolean result = collisionChecker.didTouchPaddle(ballRectangle, paddleRectangle); + + //assert + assertTrue(result); + } } diff --git a/target/classes/BattleShip/BShip$IncomingGuessReader.class b/target/classes/BattleShip/BShip$IncomingGuessReader.class new file mode 100644 index 0000000..a8f7d4c Binary files /dev/null and b/target/classes/BattleShip/BShip$IncomingGuessReader.class differ diff --git a/target/classes/BattleShip/BShip$ShipsPlacedReader.class b/target/classes/BattleShip/BShip$ShipsPlacedReader.class new file mode 100644 index 0000000..1893eb1 Binary files /dev/null and b/target/classes/BattleShip/BShip$ShipsPlacedReader.class differ diff --git a/target/test-classes/AIGridGUITest.class b/target/test-classes/AIGridGUITest.class new file mode 100644 index 0000000..50abe40 Binary files /dev/null and b/target/test-classes/AIGridGUITest.class differ diff --git a/target/test-classes/CollisionCheckerTest.class b/target/test-classes/CollisionCheckerTest.class new file mode 100644 index 0000000..357ab11 Binary files /dev/null and b/target/test-classes/CollisionCheckerTest.class differ diff --git a/target/test-classes/ShipTest.class b/target/test-classes/ShipTest.class new file mode 100644 index 0000000..2f24884 Binary files /dev/null and b/target/test-classes/ShipTest.class differ diff --git a/target/test-classes/SnakeTest.class b/target/test-classes/SnakeTest.class new file mode 100644 index 0000000..1c96711 Binary files /dev/null and b/target/test-classes/SnakeTest.class differ