@@ -0,0 +1,2072 @@
+import java.util.*;%0A%0Apublic class Layer%0A%7B%0A    public Layer (int layer, int height, int width, boolean debug)%0A    %7B%0A        _level = new HashSet%3CThreeDPoint%3E();%0A        _layer = layer;%0A        _height = height;%0A        _width = width;%0A        _debug = debug;%0A    %7D%0A%0A    public final int getLevel ()%0A    %7B%0A        return _layer;%0A    %7D%0A%0A    public final void addBug (ThreeDPoint location)%0A    %7B%0A        _level.add(location);%0A    %7D%0A%0A    public final HashSet%3CThreeDPoint%3E getBugs ()%0A    %7B%0A        return _level;%0A    %7D%0A%0A    public final long bugCount ()%0A    %7B%0A        return _level.size();%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 == GridData.CENTRE_Y) && (j == GridData.CENTRE_X))%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    @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            Level temp = (Level) obj;%0A%0A            if (temp._level.size() == _level.size())%0A            %7B%0A                Iterator%3CThreeDPoint%3E iter = _level.iterator();%0A%0A                while (iter.hasNext())%0A                %7B%0A                    if (!temp._level.contains(iter.next()))%0A                        return false;%0A                %7D%0A%0A                return true;%0A            %7D%0A        %7D%0A%0A        return false;%0A    %7D%0A%0A    private HashSet%3CThreeDPoint%3E _level;%0A    private int _layer;%0A    private int _height;%0A    private int _width;%0A    private boolean _debug;

Create Layer.java