|
@ -5,6 +5,8 @@ import java.util.HashMap; |
|
|
public class VisualizerPlainTextUltra implements Visualizer { |
|
|
public class VisualizerPlainTextUltra implements Visualizer { |
|
|
|
|
|
|
|
|
public boolean showScore = true; |
|
|
public boolean showScore = true; |
|
|
|
|
|
|
|
|
|
|
|
public final int playerAnimationTime = 2; |
|
|
|
|
|
|
|
|
private String output; |
|
|
private String output; |
|
|
|
|
|
|
|
@ -155,8 +157,28 @@ public class VisualizerPlainTextUltra implements Visualizer { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(containsPlayer) { |
|
|
if(containsPlayer) { |
|
|
|
|
|
if((gameManager.time / playerAnimationTime) % 2 == 0) { |
|
|
|
|
|
int directionIndex = 0; |
|
|
|
|
|
|
|
|
|
|
|
if(gameManager.player.direction.equals(new Vector2(0, 1))) { |
|
|
|
|
|
directionIndex = 0; |
|
|
|
|
|
} |
|
|
|
|
|
else if(gameManager.player.direction.equals(new Vector2(0, -1))) { |
|
|
|
|
|
directionIndex = 1; |
|
|
|
|
|
} |
|
|
|
|
|
else if(gameManager.player.direction.equals(new Vector2(-1, 0))) { |
|
|
|
|
|
directionIndex = 2; |
|
|
|
|
|
} |
|
|
|
|
|
else if(gameManager.player.direction.equals(new Vector2(1, 0))) { |
|
|
|
|
|
directionIndex = 3; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
lineBuffer = AttachToBuffer(lineBuffer, playerAltSprites[directionIndex]); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
lineBuffer = AttachToBuffer(lineBuffer, playerSprite); |
|
|
lineBuffer = AttachToBuffer(lineBuffer, playerSprite); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
else if(containsGhosts) { |
|
|
else if(containsGhosts) { |
|
|
lineBuffer = AttachToBuffer(lineBuffer, ghostSprites[ghostIndex]); |
|
|
lineBuffer = AttachToBuffer(lineBuffer, ghostSprites[ghostIndex]); |
|
|
} |
|
|
} |
|
|