From 36dc3b18eea1cf3e2f7f1226068383e6b59ed696 Mon Sep 17 00:00:00 2001 From: fdai2751 Date: Thu, 8 Feb 2024 00:52:44 +0100 Subject: [PATCH] added Ghost BB in the Field --- src/main/java/pacmanGame/VisualizerPlainText.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/pacmanGame/VisualizerPlainText.java b/src/main/java/pacmanGame/VisualizerPlainText.java index 330d7f5..0c6fbd3 100644 --- a/src/main/java/pacmanGame/VisualizerPlainText.java +++ b/src/main/java/pacmanGame/VisualizerPlainText.java @@ -48,6 +48,7 @@ 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 containsGhosts1 = false; boolean containsPlayer = false; for( int i = 0; i < gameManager.ghosts.length; i++) { if(gameManager.ghosts[i].position.equals(cell.pos)) { @@ -64,6 +65,9 @@ public class VisualizerPlainText implements Visualizer { else if(containsGhosts) { output += ghostSprite; } + else if (containsGhosts1) { + output += ghostSprite1; + } else if (sprites.containsKey(cell.type)) { output += sprites.get(cell.type);