import java.util.*;

public class Solver
{
    public Solver (boolean debug)
    {
        _debug = debug;
    }

    public Vector<Tile> arrangement (Vector<Tile> tiles)
    {
        Vector<Tile> toReturn = new Vector<Tile>();
        int dimension = (int) Math.sqrt((double) tiles.size());

        if (_debug)
            System.out.println("Dimensions "+dimension+" by "+dimension);

        for (int i = 0; i < tiles.size(); i++)
        {
            Tile t = tiles.elementAt(i);
        }

        return toReturn;
    }

    private int numberOfMatchingEdges (Tile toCheck, Vector<Tile> tiles)
    {
        int number = 0;
        
        for (int i = 0; i < tiles.size(); i++)
        {
            Tile t = tiles.elementAt(i);

            if (!t.equals(toCheck))  // don't compare with ourself!
            {
                for (int j = 0; j < 4; j++)
                {
                    
                }
            }
        }

        return number;
    }

    private boolean _debug;
}
@@ -479,16 +479,62 @@
 ntAt(i);
+%0A%0A            numberOfMatchingEdges(t, tiles);
 %0A       
@@ -652,41 +652,8 @@
   %7B%0A
-        int number = 0;%0A        %0A
     
@@ -737,32 +737,60 @@
 es.elementAt(i);
+%0A            int number = 0;
 %0A%0A            if
@@ -943,26 +943,327 @@
     
-%0A                %7D
+for (int k = 0; k %3C 4; k++)%0A                    %7B%0A                        if (t.getEdges()%5Bj%5D.equals(toCheck.getEdges()%5Bk%5D))%0A                            number++;%0A                    %7D%0A                %7D%0A%0A                System.out.println(%22Tile %22+t.getID()+%22 shares %22+number+%22 common edges with tile %22+toCheck.getID());
 %0A   
@@ -1299,22 +1299,17 @@
  return 
-number
+0
 ;%0A    %7D%0A

Update Solver.java