Browse Source

refactoring: created for loop to eliminate redundancy

main
fdai7012 11 months ago
parent
commit
13ba90228a
  1. 10
      src/test/java/pacmanTests/GhostTest.java

10
src/test/java/pacmanTests/GhostTest.java

@ -93,12 +93,10 @@ class GhostTest {
gameManager.ghosts[0].position = new Vector2(25, 1);
// act
gameManager.ghosts[0].move();
gameManager.ghosts[0].move();
gameManager.ghosts[0].move();
gameManager.ghosts[0].move();
gameManager.ghosts[0].move();
gameManager.ghosts[0].move();
for(int i = 0; i < 6; i++) {
gameManager.ghosts[0].move();
}
Vector2 ghostPos = gameManager.ghosts[0].position;
// assert

Loading…
Cancel
Save