diff --git a/src/main/java/pacmanGame/GameManager.java b/src/main/java/pacmanGame/GameManager.java index c33d0ac..818d0ed 100644 --- a/src/main/java/pacmanGame/GameManager.java +++ b/src/main/java/pacmanGame/GameManager.java @@ -20,9 +20,9 @@ public class GameManager { ghosts = new Ghost[4]; for(int i = 0; i < ghosts.length; i++) { ghosts[i] = new Ghost(this); - } - + } } + public void Update() { visualizer.Update(); if(time%5 == 0) { @@ -31,23 +31,19 @@ public class GameManager { time++; } - public void ProcessInput(char inputChar) { if(inputChar == 27) { //todo: escape key pauses game } - else if (inputChar == 'w' || inputChar == 's' || inputChar == 'd' || inputChar == 'a') { player.processInput(inputChar); } - - else { System.out.println("Unprocessed Input: " + inputChar + " (" + (int)inputChar + ")"); } } - public boolean GostPlayerColisionTest() - { + + public boolean GhostPlayerColisionTest() { for(int i = 0; i < ghosts.length; i++) { @@ -57,14 +53,10 @@ public class GameManager { { return true; } - - } - + } } } return false; } - - } diff --git a/src/test/java/pacmanTests/GameManagerTest.java b/src/test/java/pacmanTests/GameManagerTest.java index 9495c45..175852b 100644 --- a/src/test/java/pacmanTests/GameManagerTest.java +++ b/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 colision = gameManager.GostPlayerColisionTest(); + boolean colision = gameManager.GhostPlayerColisionTest(); boolean expected = true; // assert @@ -69,7 +69,7 @@ class GameManagerTest { gameManager.player.position = new Vector2(2,3); gameManager.ghosts[0].position = new Vector2(4,5); //act - boolean colision = gameManager.GostPlayerColisionTest(); + boolean colision = gameManager.GhostPlayerColisionTest(); boolean expected = false; // assert