public class Image
{
    /*
     * 144 tiles in the example. Hard wire
     * this for now but could make it dynamic.
     */

    public static final int MAX_X = 12;
    public static final int MAX_Y = 12;

    public static final String NO_TILE = "xxxxxxxx";

    public Image (boolean debug)
    {
        this(MAX_Y, MAX_X, debug);
    }

    public Image (int y, int x, boolean debug)
    {
        _theWorld = new Tile[y][x];

        for (int i = 0; i < y; i++)
        {
            for (int j = 0; j < x; j++)
            {
                _theWorld[i][j] = null;
            }
        }

        _debug = debug;
    }

    public void addTile (int x, int y, Tile t)
    {
        _theWorld[y][x] = t.removeBorders();

        System.out.println("Added "+t.removeBorders()+" to "+x+" "+y);
    }

    @Override
    public String toString ()
    {
        String str = "";
        int index = 0;
        int maxIndex = 0;

        do
        {
            for (int i = 0; i < _theWorld.length; i++)
            {
                for (int j = 0; j < _theWorld[0].length; j++)
                {
                    Tile t = _theWorld[i][j];

                    if (t != null)
                    {
                        str += t.line(index);

                        maxIndex = t.numberOfLines();
                    }
                    else
                        str += NO_TILE;
                }

                str += "\n";
            }

            index++;

        } while (index < maxIndex);

        return str;
    }

    private Tile[][] _theWorld;
    private boolean _debug;
}
@@ -877,641 +877,8 @@
  %22%22;
-%0A        int index = 0;%0A        int maxIndex = 0;%0A%0A        do%0A        %7B%0A            for (int i = 0; i %3C _theWorld.length; i++)%0A            %7B%0A                for (int j = 0; j %3C _theWorld%5B0%5D.length; j++)%0A                %7B%0A                    Tile t = _theWorld%5Bi%5D%5Bj%5D;%0A%0A                    if (t != null)%0A                    %7B%0A                        str += t.line(index);%0A%0A                        maxIndex = t.numberOfLines();%0A                    %7D%0A                    else%0A                        str += NO_TILE;%0A                %7D%0A%0A                str += %22%5Cn%22;%0A            %7D%0A%0A            index++;%0A%0A        %7D while (index %3C maxIndex);
 %0A%0A  

Update Image.java