Browse Source

refactoring: changed spelling in ghostPlayerColision method in GameManager

remotes/origin/playerRefactoring
fdai7910 11 months ago
parent
commit
fef13d5991
  1. 2
      src/main/java/pacmanGame/GameManager.java
  2. 4
      src/test/java/pacmanTests/GameManagerTest.java

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

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

4
src/test/java/pacmanTests/GameManagerTest.java

@ -55,7 +55,7 @@ class GameManagerTest {
GameManager gameManager = new GameManager(); GameManager gameManager = new GameManager();
gameManager.player.position = gameManager.ghosts[0].position.Clone(); gameManager.player.position = gameManager.ghosts[0].position.Clone();
//act //act
boolean collision = gameManager.GhostPlayerColisionTest();
boolean collision = gameManager.ghostPlayerColisionTest();
boolean expected = true; boolean expected = true;
// assert // assert
@ -70,7 +70,7 @@ class GameManagerTest {
gameManager.player.position = new Vector2(2,3); gameManager.player.position = new Vector2(2,3);
gameManager.ghosts[0].position = new Vector2(4,5); gameManager.ghosts[0].position = new Vector2(4,5);
//act //act
boolean collision = gameManager.GhostPlayerColisionTest();
boolean collision = gameManager.ghostPlayerColisionTest();
boolean expected = false; boolean expected = false;
// assert // assert

Loading…
Cancel
Save