import java.util.Set;

/*
 * 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.
 */

public class State
{
    public State (Coordinate coord, Set<Character> keys, int steps)
    {
        _coord = coord;
        _keys = keys;
        _steps = steps;
        _id = Util.keycode(keys);
    }

    public Coordinate getPosition ()
    {
        return _coord;
    }

    public int numberOfKeys ()
    {
        return _keys.size();
    }

    public int numberOfSteps ()
    {
        return _steps;
    }

    public boolean hasKey (char door)
    {
        char key = Character.toLowerCase(door);

        return _keys.contains(door);
    }

    public Set<Character> getKeys ()
    {
        return _keys;
    }

    public String getIdentifier ()
    {
        return _id;
    }

    private Coordinate _coord;
    private Set<Character> _keys;
    private int _steps;
    private String _id;
}

@@ -920,24 +920,539 @@
 _id;%0A    %7D%0A%0A
+    @Override%0A    public int hashCode ()%0A    %7B%0A        return _coord.hashCode();%0A    %7D%0A%0A    @Override%0A    public boolean equals (Object obj)%0A    %7B%0A        if (obj == null)%0A            return false;%0A%0A        if (this == obj)%0A            return true;%0A        %0A        if (getClass() == obj.getClass())%0A        %7B%0A            State temp = (State) obj;%0A%0A            if (temp._coord.equals(_coord))%0A            %7B%0A                return temp._keys.containsAll(_keys);%0A            %7D%0A        %7D%0A%0A        return false;%0A    %7D%0A%0A
     private 

Update State.java