diff options
Diffstat (limited to 'src/Q9/Robot.java')
| -rw-r--r-- | src/Q9/Robot.java | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/Q9/Robot.java b/src/Q9/Robot.java index 787f7cc..ee495e6 100644 --- a/src/Q9/Robot.java +++ b/src/Q9/Robot.java @@ -37,6 +37,7 @@ public class Robot { /** * Constructs an instance of a robot. + * * @param x the x coordinate of the robot. * @param y the y coordinate of the robot. */ @@ -45,37 +46,27 @@ public class Robot { this.y = y; } - /** - * @return the x coordinate - */ + /** @return the x coordinate */ public int getX() { return x; } - /** - * @return the y coordinate - */ + /** @return the y coordinate */ public int getY() { return y; } - /** - * @param x the x coordinate to move to. - */ + /** @param x the x coordinate to move to. */ public void setX(int x) { this.x = x; } - /** - * @param y the y coordinate to move to. - */ + /** @param y the y coordinate to move to. */ public void setY(int y) { this.y = y; } - /** - * @return true if the robot is at the given coordinate - */ + /** @return true if the robot is at the given coordinate */ public boolean atPosition(int x, int y) { return getX() == x && getY() == y; } |
