diff --git a/src/test/java/pacmanTests/GameManagerTest.java b/src/test/java/pacmanTests/GameManagerTest.java index 5af88ab..36cc2c2 100644 --- a/src/test/java/pacmanTests/GameManagerTest.java +++ b/src/test/java/pacmanTests/GameManagerTest.java @@ -74,13 +74,22 @@ class GameManagerTest { game.handleGhostCollision(); game.handleGhostCollision(); int expectedScore = 0; - - assertThat(game.score).isEqualTo(expectedScore); - - - + assertThat(game.score).isEqualTo(expectedScore); } + + @Test + void testPlayerLivesRestoredwhenGhostCaughtPlayerTreeTime() { + GameManager game = new GameManager(); + + game.livesRemaining = 3; + game.handleGhostCollision(); + game.handleGhostCollision(); + game.handleGhostCollision(); + int expectedLives = 3; + assertThat(game.livesRemaining).isEqualTo(expectedLives); + } + @Test void GameManager_GostPlayerCollisionTest_DoesntDetectColliosion() { // arrange