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 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 y = _theWorld.length;
        int x = _theWorld[0].length;

        /*
        0,0 0,1 0,2
        1,0 1,1 1,2
        2,0 2,1 2,2
*/

        for (int i = 0; i < y; i++)
        {
            for (int index = 0; index < x; index++)
            {
                Tile t = _theWorld[i][index];

                if (t != null)
                {
                    for (int j = 0; j < t.numberOfLines(); j++)
                    {
                        str += t.line(j);
                    }
                }

                str += "\n";
            }

            str += "\n";
        }

        return str;
    }

    private Tile[][] _theWorld;
    private boolean _debug;
}
@@ -669,80 +669,8 @@
 s();
-%0A%0A        System.out.println(%22Added %22+t.removeBorders()+%22 to %22+x+%22 %22+y);
 %0A   
@@ -949,29 +949,24 @@
             
-for (
 int index = 
@@ -971,42 +971,8 @@
 = 0;
- index %3C x; index++)%0A            %7B
 %0A   
@@ -980,20 +980,16 @@
         
-    
 Tile t =
@@ -1027,31 +1027,36 @@
     
-    if (t != null)%0A    
+for (int j = 0; j %3C x; j++)%0A
     
@@ -1081,37 +1081,28 @@
         
-    for (int j = 0; j
+while (index
  %3C t.num
@@ -1113,27 +1113,18 @@
 fLines()
-; j++)%0A    
+)%0A
         
@@ -1132,32 +1132,67 @@
        %7B%0A       
+             t = _theWorld%5Bi%5D%5Bj%5D;%0A%0A
                 
@@ -1188,24 +1188,27 @@
             
+   
 str += t.lin
@@ -1213,12 +1213,17 @@
 ine(
-j
+index
 );%0A
+%0A
     
@@ -1230,33 +1230,40 @@
                 
-%7D
+index++;
 %0A               

Update Image.java