|
@ -56,6 +56,7 @@ public class VisualizerPlainText implements Visualizer { |
|
|
for(int x = 0; x < map.size.x; x++) { |
|
|
for(int x = 0; x < map.size.x; x++) { |
|
|
Cell cell = map.GetCell(new Vector2(x, map.size.y - 1 - y)); |
|
|
Cell cell = map.GetCell(new Vector2(x, map.size.y - 1 - y)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(gameManager.isPaused && 5 < y && y <= 10){ |
|
|
if(gameManager.isPaused && 5 < y && y <= 10){ |
|
|
if(x == 0) { |
|
|
if(x == 0) { |
|
|
if(y == 8){ |
|
|
if(y == 8){ |
|
@ -66,8 +67,16 @@ public class VisualizerPlainText implements Visualizer { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else { |
|
|
|
|
|
|
|
|
|
|
|
boolean containsGhosts = false; |
|
|
boolean containsGhosts = false; |
|
|
|
|
|
boolean containsGhosts1 = false; |
|
|
|
|
|
boolean containsGhosts2 = false; |
|
|
|
|
|
boolean containsGhosts3 = false; |
|
|
|
|
|
boolean containsGhosts4 = false; |
|
|
|
|
|
boolean containsGhosts5 = false; |
|
|
|
|
|
boolean containsGhosts6 = false; |
|
|
|
|
|
boolean containsGhosts7 = false; |
|
|
|
|
|
boolean containsGhosts8 = false; |
|
|
boolean containsPlayer = false; |
|
|
boolean containsPlayer = false; |
|
|
for( int i = 0; i < gameManager.ghosts.length; i++) { |
|
|
for( int i = 0; i < gameManager.ghosts.length; i++) { |
|
|
if(gameManager.ghosts[i].position.equals(cell.pos)) { |
|
|
if(gameManager.ghosts[i].position.equals(cell.pos)) { |
|
@ -78,6 +87,53 @@ public class VisualizerPlainText implements Visualizer { |
|
|
containsPlayer = true; |
|
|
containsPlayer = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(containsPlayer) { |
|
|
|
|
|
output += playerSprite; |
|
|
|
|
|
} |
|
|
|
|
|
else if(containsGhosts) { |
|
|
|
|
|
output += ghostSprite; |
|
|
|
|
|
} |
|
|
|
|
|
else if (containsGhosts1) { |
|
|
|
|
|
output += ghostSprite1; |
|
|
|
|
|
} |
|
|
|
|
|
else if (containsGhosts2) { |
|
|
|
|
|
output += ghostSprite2; |
|
|
|
|
|
} |
|
|
|
|
|
else if (containsGhosts3) { |
|
|
|
|
|
output += ghostSprite3; |
|
|
|
|
|
} |
|
|
|
|
|
else if (containsGhosts4) { |
|
|
|
|
|
output += ghostSprite4; |
|
|
|
|
|
} |
|
|
|
|
|
else if (containsGhosts5) { |
|
|
|
|
|
output += ghostSprite5; |
|
|
|
|
|
} |
|
|
|
|
|
else if (containsGhosts6) { |
|
|
|
|
|
output += ghostSprite6; |
|
|
|
|
|
} |
|
|
|
|
|
else if (containsGhosts7) { |
|
|
|
|
|
output += ghostSprite7; |
|
|
|
|
|
} |
|
|
|
|
|
else if (containsGhosts8) { |
|
|
|
|
|
output += ghostSprite8; |
|
|
|
|
|
} |
|
|
|
|
|
else if (sprites.containsKey(cell.type)) { |
|
|
|
|
|
|
|
|
|
|
|
output += sprites.get(cell.type); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
else { |
|
|
|
|
|
containsGhosts = false; |
|
|
|
|
|
containsPlayer = false; |
|
|
|
|
|
for( int i = 0; i < gameManager.ghosts.length; i++) { |
|
|
|
|
|
if(gameManager.ghosts[i].position.equals(cell.pos)) { |
|
|
|
|
|
containsGhosts = true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if(gameManager.player.position.equals(cell.pos)) { |
|
|
|
|
|
containsPlayer = true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(containsPlayer) { |
|
|
if(containsPlayer) { |
|
|
output += playerSprite; |
|
|
output += playerSprite; |
|
|
} |
|
|
} |
|
|