import java.util.*;

public class Level
{
    public Level (boolean debug)
    {
        _level = new HashSet<ThreeDPoint>();
        _debug = debug;
    }

    public void addBug (ThreeDPoint location)
    {
        _level.add(location);
    }

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

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

            if (temp._level.size() == _level.size())
            {
                Iterator<ThreeDPoint> iter = _level.iterator();

                while (iter.hasNext())
                {
                    if (!temp._level.contains(iter.next()))
                        return false;
                }

                return true;
            }
        }

        return false;
    }

    private HashSet<ThreeDPoint> _level;
    private boolean _debug;
}
@@ -50,15 +50,199 @@
 lic 
-Level (
+static final int CENTRE_HEIGHT = 2;  // TODO only makes sense for 5x5 so need to fix this!!%0A    public static final int CENTRE_WIDTH = 2;%0A%0A    public Level (int layer, int height, int width, 
 bool
@@ -303,16 +303,90 @@
 int%3E();%0A
+        _layer = layer;%0A        _height = height;%0A        _width = width;%0A
         
@@ -493,24 +493,705 @@
 on);%0A    %7D%0A%0A
+    @Override%0A    public String toString ()%0A    %7B%0A        String str = %22%22;%0A        %0A        for (int i = 0; i %3C _height; i++)%0A        %7B%0A            for (int j = 0; j %3C _width; j++)%0A            %7B%0A                if ((i == CENTRE_HEIGHT) && (j == CENTRE_WIDTH))%0A                    str += TileId.NESTED_GRID;%0A                else%0A                %7B%0A                    ThreeDPoint point = new ThreeDPoint(i, j, _layer);%0A%0A                    if (_level.contains(point))%0A                        str += TileId.BUG;%0A                    else%0A                        str += TileId.EMPTY_SPACE;%0A                %7D%0A            %7D%0A%0A            str += %22%5Cn%22;%0A        %7D%0A%0A        return str;%0A    %7D%0A%0A
     @Overrid
@@ -1869,16 +1869,89 @@
 _level;%0A
+    private int _layer;%0A    private int _height;%0A    private int _width;%0A
     priv

Update Level.java