diff --git a/src/main/java/pacmanGame/VisualizerPlainText.java b/src/main/java/pacmanGame/VisualizerPlainText.java index 142242d..8559f95 100644 --- a/src/main/java/pacmanGame/VisualizerPlainText.java +++ b/src/main/java/pacmanGame/VisualizerPlainText.java @@ -34,14 +34,21 @@ public class VisualizerPlainText implements Visualizer { for(int x = 0; x < map.size.x; x++) { Cell cell = map.GetCell(new Vector2(x, map.size.y - 1 - y)); boolean containsGhosts = false; + boolean containsPlayer = false; for( int i = 0; i < gameManager.ghosts.length; i++) { if(gameManager.ghosts[i].position.equals(cell.pos)) { containsGhosts = true; } } - - if(containsGhosts) { - output += ghostSprite; + if(gameManager.player.position.equals(cell.pos)) { + containsPlayer = true; + } + + if(containsPlayer) { + output += playerSprite; + } + else if(containsGhosts) { + output += ghostSprite; } else if (sprites.containsKey(cell.type)) {