import java.util.*;

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

    /**
     * Loop through the tiles and find out how many of them have matching edges. Then,
     * based upon the number of shared edges we do the following:
     * 
     * 0: ERROR!!
     * 1: If a tile has only one matching edge, then it's easy to say where it needs
     * to be placed.
     * 2: Work outwards from the centre.
     */

    public Vector<Tile> solve (Vector<Tile> tiles)
    {
        Vector<Tile> cornerTiles = new Vector<Tile>();

        return cornerTiles;
    } 

    private boolean connects (Tile theTile, Tile toCheck)
    {
        for (int i = 0; i < 4; i++)
        {
            if (theTile.connectBottomToTop(toCheck) || theTile.connectTopToBottom(toCheck) ||
                theTile.connectLeftToRight(toCheck) || theTile.connectRightToLeft(toCheck))
            {
                return true;
            }

            if (!toCheck.isFrozen())
                toCheck.rotate();
        }
        
        if (!toCheck.isFrozen())
            toCheck.invert();
    
        for (int i = 0; i < 4; i++)
        {
            if (theTile.connectBottomToTop(toCheck) || theTile.connectTopToBottom(toCheck) ||
                theTile.connectLeftToRight(toCheck) || theTile.connectRightToLeft(toCheck))
            {
                return true;
            }
        }

        return false;
    }

    private boolean _debug;
}
@@ -18,113 +18,12 @@
 *;%0A%0A
-public class Solver%0A%7B%0A    public Solver (boolean debug)%0A    %7B%0A        _debug = debug;%0A    %7D%0A%0A    
 /**%0A
-    
  * L
@@ -101,20 +101,16 @@
 . Then,%0A
-    
  * based
@@ -168,19 +168,11 @@
 g:%0A 
-    * %0A    
+* %0A
  * 0
@@ -181,20 +181,16 @@
 ERROR!!%0A
-    
  * 1: If
@@ -262,20 +262,16 @@
 t needs%0A
-    
  * to be
@@ -279,20 +279,16 @@
 placed.%0A
-    
  * 2: Wo
@@ -321,14 +321,103 @@
 e.%0A 
-    */
+*/%0A%0Apublic class Solver%0A%7B%0A    public Solver (boolean debug)%0A    %7B%0A        _debug = debug;%0A    %7D
 %0A%0A  
@@ -527,16 +527,436 @@
 le%3E();%0A%0A
+        for (int i = 0; i %3C tiles.size(); i++)%0A        %7B%0A            Tile current = tiles.elementAt(i);%0A            int count = 0;%0A%0A            for (int j = 0; j %3C tiles.size(); j++)%0A            %7B%0A                if (!current.equals(tiles.elementAt(j)) && connects(current, tiles.elementAt(j)))%0A                    count++;%0A            %7D%0A%0A            if (count == 2)%0A                cornerTiles.add(current);%0A        %7D%0A%0A
         

Update Solver.java