diff options
| author | mo khan <mo@mokhan.ca> | 2019-08-11 17:58:50 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2019-08-11 17:58:50 -0600 |
| commit | 81e51d1a04d6fbcbc4365a78975d383e35d04ac5 (patch) | |
| tree | 0673324025cfd821233c8900eea1390e8d150c07 /src/Q9/Robot.java | |
| parent | 03d8081a7382705a81ed2c80e2bc1e4f807b5dc6 (diff) | |
add documentation
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; } |
