import java.util.*;

/*
 * Instances of this class are used to record the current
 * search pattern through the tunnels. We need to remember
 * the starting point, the keys we've found and the number
 * of steps to this stage.
 */

 // Was essentially State in part 1.

public class Journey
{
    public Journey (List<Coordinate> robotLocation, Set<Character> keys, int steps)
    {
        _locations = robotLocation;
        _keys = keys;
        _steps = steps;
        _id = Util.keycode(_keys);
    }

    @Override
    public int hashCode ()
    {
        return _locations.hashCode();
    }

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

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

            // assume order matters for equality too!

            if (temp._locations.size() == _locations.sizze())
            {
                for (int i = 0; i < temp._locations.size(); i++)
                {
                    if (!_temp._locations.get(i).equals(_location.get(i)))
                        return false;
                }

                if (temp._coord.equals(_coord))
                {
                    return temp._keys.containsAll(_keys);
                }
            }
        }

        return false;
    }

    @Override
    public String toString()
    {
        return "Journey "+_id+ ", " + steps;
    }

    private List<Position> _locations;
    private Set<Character> _keys;
    private int _steps;
    private String _id;
}
@@ -1096,17 +1096,16 @@
    if (!
-_
 temp._lo
@@ -1193,33 +1193,32 @@
               %7D%0A
-%0A
                 
@@ -1221,62 +1221,13 @@
     
-if (temp._coord.equals(_coord))%0A                %7B%0A
     
+%0A
     
@@ -1276,34 +1276,16 @@
 _keys);%0A
-                %7D%0A
         
@@ -1402,16 +1402,18 @@
 %22Journey
+ %3C
  %22+_id+ 
@@ -1419,21 +1419,27 @@
  %22, %22 + 
+_
 steps
++%22 %3E%22
 ;%0A    %7D%0A
@@ -1460,16 +1460,18 @@
 ist%3C
-Position
+Coordinate
 %3E _l

Update Journey.java