Browse Source

added the Ghost CC in the Field

remotes/origin/ghostsbehaviour
fdai2751 11 months ago
parent
commit
ba5d3c3fa4
  1. 4
      src/main/java/pacmanGame/VisualizerPlainText.java

4
src/main/java/pacmanGame/VisualizerPlainText.java

@ -50,6 +50,7 @@ public class VisualizerPlainText implements Visualizer {
boolean containsGhosts = false;
boolean containsGhosts1 = false;
boolean containsGhosts2 = false;
boolean containsGhosts3 = false;
boolean containsPlayer = false;
for( int i = 0; i < gameManager.ghosts.length; i++) {
if(gameManager.ghosts[i].position.equals(cell.pos)) {
@ -72,6 +73,9 @@ public class VisualizerPlainText implements Visualizer {
else if (containsGhosts2) {
output += ghostSprite2;
}
else if (containsGhosts3) {
output += ghostSprite3;
}
else if (sprites.containsKey(cell.type)) {
output += sprites.get(cell.type);

Loading…
Cancel
Save