public class Tile
{
    public static final int TOP = 0;
    public static final int LEFT = 1;
    public static final int BOTTOM = 2;
    public static final int RIGHT = 3;

    public Tile (long number, String[] data)
    {
        _id = number;
        _data = new char[data.length][data[0].length()];
        _originalState = new char[data.length][data[0].length()];

        for (int i = 0; i < data.length; i++)
        {
            for (int j = 0; j < data[0].length(); j++)
            {
                _data[i][j] = data[i].charAt(j);
                _originalState[i][j] = data[i].charAt(j);
            }
        }

        _freeze = false;  // should the tile move?
    }

    public final long getID ()
    {
        return _id;
    }

    /*
     * rotates tile 90 degrees clockwise. Assume you
     * have to call it multiple times to get through
     * all 360 degrees.
     */

    public void rotate ()
    {
        int x = _data.length;
	    int y = _data[0].length;
	    char[][] temp = new char[x][y];

        for (int i = 0; i < x; i++)
        {
            for (int j = 0; j < y; j++)
            {
                temp[j][x - 1 - i] = _data[i][j];
            }
        }

        _data = temp;
    }

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

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

            return (_id == temp._id);
        }

        return false;
    }

    @Override
    public String toString ()
    {
        String str = TileData.TILE_ID+_id+":\n";

        for (int i = 0; i < _data.length; i++)
        {
            for (int j = 0; j < _data[0].length; j++)
            {
                str += _data[i][j];
            }

            str += "\n";
        }

        return str;
    }

    private long _id;
    private char[][] _data;
    private char[][] _originalState;
    private boolean _freeze;
}
@@ -672,16 +672,141 @@
 le move?
+%0A%0A        for (int i = 0; i %3C 4; i++)%0A        %7B%0A            _connections%5Bi%5D = false;  // which edges are connected?%0A        %7D
 %0A    %7D%0A%0A
@@ -1341,32 +1341,423 @@
  = temp;%0A    %7D%0A%0A
+    /*%0A     * Flip top to bottom.%0A     */%0A%0A    public void invert ()%0A    %7B%0A        int x = _data.length;%0A%09    int y = _data%5B0%5D.length;%0A%09    char%5B%5D%5B%5D temp = new char%5Bx%5D%5By%5D;%0A%0A        for (int i = 0; i %3C x; i++)%0A        %7B%0A            for (int j = 0; j %3C y; j++)%0A            %7B%0A                temp%5Bi%5D%5B_data%5Bi%5D.length - j - 1%5D = _data%5Bi%5D%5Bj%5D;%0A            %7D%0A        %7D%0A%0A        _data = temp;%0A    %7D%0A%0A
     @Override%0A  
@@ -2503,16 +2503,16 @@
 lState;%0A
-
     priv
@@ -2532,9 +2532,45 @@
 freeze;%0A
+    private boolean%5B%5D _connections;%0A
 %7D

Update Tile.java