summaryrefslogtreecommitdiff
path: root/src/Q9/Robot.java
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2019-08-05 14:34:43 -0600
committermo khan <mo@mokhan.ca>2019-08-05 14:34:43 -0600
commit3f520691ecd854df058f4ead26abdbd6f6e5c15e (patch)
treed294e1e7eaea1bb162de010ae1e502f6acc98847 /src/Q9/Robot.java
parent518b6610a9b0e1c0e5c87742136731548eb4fbee (diff)
extract constants for sprites
Diffstat (limited to 'src/Q9/Robot.java')
-rw-r--r--src/Q9/Robot.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Q9/Robot.java b/src/Q9/Robot.java
index f3a709a..0fe95b5 100644
--- a/src/Q9/Robot.java
+++ b/src/Q9/Robot.java
@@ -18,9 +18,10 @@ public class Robot {
public static final int SOUTH_WEST = LEFT_DOWN_CORNER;
public static final int WEST = LEFT;
public static final int NORTH_WEST = LEFT_UP_CORNER;
- public static final String R1 = "1";
- public static final String R2 = "2";
- public static final String COLLISION = "X";
+ public static final String R1 = "🤖";
+ public static final String R2 = "🚀";
+ public static final String COLLISION = "🔥";
+ public static final String SPACE = " ";
private int x;
private int y;
@@ -60,7 +61,7 @@ public class Robot {
if (r1InCell && r2InCell) grid += "|" + COLLISION;
else if (r1InCell) grid += "|" + R1;
else if (r2InCell) grid += "|" + R2;
- else grid += "| ";
+ else grid += "|" + SPACE;
}
grid += String.format("|%s", System.lineSeparator());
}