Browse Source

Merge branch 'main' of https://gitlab.cs.hs-fulda.de/fdai7012/pacmayham

remotes/origin/playerRefactoring
fdai7910 11 months ago
parent
commit
fcf09ae1cf
  1. 20
      src/main/java/pacmanGame/VisualizerPlainTextUltra.java
  2. 16
      src/test/java/pacmanTests/GhostTest.java

20
src/main/java/pacmanGame/VisualizerPlainTextUltra.java

@ -66,7 +66,7 @@ public class VisualizerPlainTextUltra implements Visualizer {
"~~~~"
},
{
"/°°\\",
"/**\\",
"~~~~"
},
{
@ -104,25 +104,25 @@ public class VisualizerPlainTextUltra implements Visualizer {
public final String[] playerSprite = {
"o88o",
"°88°"
"*88*"
};
public final String[][] playerAltSprites = {
{
"o o",
"°oo°"
"*88*"
},
{
"o°°o",
"° °"
"o88o",
"* *"
},
{
" °°o",
" o"
" *8o",
" o8*"
},
{
"o°° ",
"°oo "
"o8* ",
"*8o "
}
};
@ -140,7 +140,7 @@ public class VisualizerPlainTextUltra implements Visualizer {
output = "";
if(showScore) {
output = "\nSCORE: " + gameManager.score + "\n\n";
output = "\nSCORE: " + gameManager.score + " LIVES: " + gameManager.livesRemaining + "\n\n";
}
int lineBufferSize = 2;

16
src/test/java/pacmanTests/GhostTest.java

@ -52,6 +52,18 @@ class GhostTest {
// assert
//assertThat(position).isEqualTo(expectedPosition);
}
@Test
void Ghosts_wall_doesntobstructMovement() {
// arrange
//GameManager gameManager = new GameManager();
//Ghost ghost = gameManager.ghosts[0];
//ghost.position = new Vector2(2,2);
//Vector2 direction = new Vector2(-1,0);
//Vector2 expectedPosition = new Vector2(1,2);
// act
//ghost.move(direction);
//Vector2 position = ghost.position;
// assert
//assertThat(position).isEqualTo(expectedPosition);
}
}
Loading…
Cancel
Save