diff options
Diffstat (limited to 'src/Q9/Robot.java')
| -rw-r--r-- | src/Q9/Robot.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Q9/Robot.java b/src/Q9/Robot.java index 638b581..ed0c28c 100644 --- a/src/Q9/Robot.java +++ b/src/Q9/Robot.java @@ -54,7 +54,8 @@ public class Robot { boolean r1InCell = r1.atPosition(row, column); boolean r2InCell = r2.atPosition(row, column); - if (r1InCell) grid += "|1"; + if (r1InCell && r2InCell) grid += "|X"; + else if (r1InCell) grid += "|1"; else if (r2InCell) grid += "|2"; else grid += "| "; } |
