From f912d1bb2be86f4c1c940a825c705e77bd2b86c7 Mon Sep 17 00:00:00 2001 From: fdai2751 Date: Thu, 8 Feb 2024 00:58:30 +0100 Subject: [PATCH] added the Ghost CC 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 0c6fbd3..196109c 100644 --- a/src/main/java/pacmanGame/VisualizerPlainText.java +++ b/src/main/java/pacmanGame/VisualizerPlainText.java @@ -49,6 +49,7 @@ public class VisualizerPlainText implements Visualizer { Cell cell = map.GetCell(new Vector2(x, map.size.y - 1 - y)); boolean containsGhosts = false; boolean containsGhosts1 = false; + boolean containsGhosts2 = false; boolean containsPlayer = false; for( int i = 0; i < gameManager.ghosts.length; i++) { if(gameManager.ghosts[i].position.equals(cell.pos)) { @@ -68,6 +69,9 @@ public class VisualizerPlainText implements Visualizer { else if (containsGhosts1) { output += ghostSprite1; } + else if (containsGhosts2) { + output += ghostSprite2; + } else if (sprites.containsKey(cell.type)) { output += sprites.get(cell.type);