diff --git a/src/test/java/pacmanTests/GameManagerTest.java b/src/test/java/pacmanTests/GameManagerTest.java index 36cc2c2..a04b788 100644 --- a/src/test/java/pacmanTests/GameManagerTest.java +++ b/src/test/java/pacmanTests/GameManagerTest.java @@ -83,9 +83,9 @@ class GameManagerTest { GameManager game = new GameManager(); game.livesRemaining = 3; - game.handleGhostCollision(); - game.handleGhostCollision(); - game.handleGhostCollision(); + for(int i = 0;i < 3; i++) { + game.handleGhostCollision(); + } int expectedLives = 3; assertThat(game.livesRemaining).isEqualTo(expectedLives); }