import java.util.Objects;

/*
 * Represents a <x, y> coordinate for a piece of a wire.
 */

public class Coordinate
{
    public Coordinate (Coordinate coord)
    {
        _x = coord._x;
        _y = coord._y;
    }

    public Coordinate (int x, int y)
    {
        _x = x;
        _y = y;
    }

    public final int getX ()
    {
        return _x;
    }

    public final int getY ()
    {
        return _y;
    }

    @Override
    public String toString ()
    {
        return "<"+_x+", "+_y+">";
    }

    @Override
    public int hashCode ()
    {
        return Objects.hash(_x, _y);
    }

    @Override
    public boolean equals (Object obj)
    {
        if (obj == null)
            return false;

        if (this == obj)
            return true;
        
        if (getClass() == obj.getClass())
        {
            Coordinate temp = (Coordinate) obj;

            return ((_x == temp._x) && (_y == temp._y));
        }

        return false;
    }

    private int _x;
    private int _y;
}
@@ -10,23 +10,17 @@
 va.util.
-Objects
+*
 ;%0A%0A/*%0A *
@@ -132,24 +132,20 @@
 te (
-Coordinate coord
+int x, int y
 )%0A  
@@ -161,23 +161,16 @@
    _x = 
-coord._
 x;%0A     
@@ -181,15 +181,8 @@
 y = 
-coord._
 y;%0A 
@@ -190,32 +190,37 @@
   %7D%0A%0A    public 
+List%3C
 Coordinate (int 
@@ -217,60 +217,180 @@
 nate
- (int x, int y)%0A    %7B%0A        _x = x;%0A        _y = y
+%3E directions ()%0A    %7B%0A        return List.of(new Coordinate(_x+1, _y), new Coordinate(_x-1, _y),%0A                        new Coordinate(_x, _y+1), new Coordinate(_x, _y-1))
 ;%0A  
@@ -508,32 +508,147 @@
 turn _y;%0A    %7D%0A%0A
+    public int distanceTo (Coordinate to)%0A    %7B%0A        return Math.abs(_x - to._x) + Math.abs(_y - to._y);%0A    %7D%0A%0A
     @Override%0A  

Update Coordinate.java