Browse Source

refactoring: Fixed typos

remotes/origin/ghostsbehaviour
fdai7753 11 months ago
parent
commit
36a22dea6f
  1. 2
      src/main/java/pacmanGame/GameManager.java
  2. 6
      src/test/java/pacmanTests/GameManagerTest.java

2
src/main/java/pacmanGame/GameManager.java

@ -63,7 +63,7 @@ public class GameManager {
}
}
public boolean GhostPlayerColisionTest() {
public boolean GhostPlayerCollisionTest() {
for(int i = 0; i < ghosts.length; i++) {

6
src/test/java/pacmanTests/GameManagerTest.java

@ -54,7 +54,7 @@ class GameManagerTest {
GameManager gameManager = new GameManager();
gameManager.player.position = gameManager.ghosts[0].position.Clone();
//act
boolean collision = gameManager.GhostPlayerColisionTest();
boolean collision = gameManager.GhostPlayerCollisionTest();
boolean expected = true;
// assert
@ -69,11 +69,11 @@ class GameManagerTest {
gameManager.player.position = new Vector2(2,3);
gameManager.ghosts[0].position = new Vector2(4,5);
//act
boolean colision = gameManager.GhostPlayerColisionTest();
boolean collision = gameManager.GhostPlayerCollisionTest();
boolean expected = false;
// assert
assertThat(colision).isEqualTo(expected);
assertThat(collision).isEqualTo(expected);
}
@Test
void GameManager_setupgame_spawnsghosts() {

Loading…
Cancel
Save