summaryrefslogtreecommitdiff
path: root/src/Q9/Robot.java
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2019-08-05 13:23:09 -0600
committermo khan <mo@mokhan.ca>2019-08-05 13:23:09 -0600
commit22555212598db087b128b2422b8693057ef1e88d (patch)
tree9544f3184bf583cbe5982fccd00e6b64e2c63094 /src/Q9/Robot.java
parent151b106f5d265f17ccf38e978c197e1e38dc4deb (diff)
ensure each direction is tested
Diffstat (limited to 'src/Q9/Robot.java')
-rw-r--r--src/Q9/Robot.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Q9/Robot.java b/src/Q9/Robot.java
index 6d004f0..69ef0a5 100644
--- a/src/Q9/Robot.java
+++ b/src/Q9/Robot.java
@@ -3,6 +3,7 @@ package Q9;
public class Robot {
private int x;
private int y;
+
public static final int UP = 1;
public static final int DOWN = 2;
public static final int LEFT = 3;
@@ -12,6 +13,15 @@ public class Robot {
public static final int RIGHT_UP_CORNER = 7;
public static final int RIGHT_DOWN_CORNER = 8;
+ public static final int NORTH = UP;
+ public static final int NORTH_EAST = RIGHT_UP_CORNER;
+ public static final int EAST = RIGHT;
+ public static final int SOUTH_EAST = RIGHT_DOWN_CORNER;
+ public static final int SOUTH = DOWN;
+ 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 Robot(int x, int y) {
this.x = x;
this.y = y;