@@ -0,0 +1,1428 @@
+%0A/**%0A *%0A * A generic class to represent an 2D object's position on the grid.%0A */%0Apublic class Position%0A%7B%0A%09/*%0A%09 * X-Axis coordinate.%0A%09 */%0A%09private final int x;%0A%0A%09/*%0A%09 * Y-Axis coordinate.%0A%09 */%0A%09private final int y;%0A%0A%09/**%0A%09 * Instantiate a new Position object of coordinates (x, y). Both coordinates%0A%09 * should be grater than zero and not grater than terminal size.%0A%09 *%0A%09 * @param x the X-axis coordinate of this object%0A%09 * @param y the Y-axis coordinate of this object%0A%09 */%0A%09public Position(int x, int y)%0A%09%7B%0A%09%09this.x = x;%0A%09%09this.y = y;%0A%09%7D%0A%0A%09/**%0A%09 * @return this X-axis coordinate%0A%09 */%0A%09public int getX()%0A%09%7B%0A%09%09return x;%0A%09%7D%0A%0A%09/**%0A%09 * @return this Y-axis coordinate%0A%09 */%0A%09public int getY()%0A%09%7B%0A%09%09return y;%0A%09%7D%0A%0A%09/**%0A%09 * Takes a value of type Object as parameter and yields a boolean result.%0A%09 * The implementation of this method uses instanceof and a cast. It first%0A%09 * tests whether the other object is also of type Position. If it is, it%0A%09 * compares the coordinates of the two positions and returns the result.%0A%09 * Otherwise the result is false.%0A%09 *%0A%09 * @param other the other object.%0A%09 * @return true if the coordinates are the same; otherwise returns false.%0A%09 */%0A%09@Override public boolean equals(Object other)%0A%09%7B%0A%09    boolean result = false;%0A%0A%09    if(other instanceof Position)%0A%09    %7B%0A%09        Position that = (Position) other;%0A%09        result = (getX() == that.getX() && getY() == that.getY());%0A%09    %7D%0A%0A%09    return result;%0A%09%7D%0A%7D%0A

Create Position.java