import java.util.*;

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

    public Vector<Coordinate> getBlackTiles (Vector<String> lines)
    {
        Vector<Coordinate> blackTiles = new Vector<Coordinate>();

        for (int i = 0; i < lines.size(); i++)
        {
            Coordinate coord = tilePosition(lines.elementAt(i));

            if (!blackTiles.contains(coord))
                blackTiles.add(coord);
            else
                blackTiles.remove(coord);
        }

        return blackTiles;
    }

    private Coordinate tilePosition (String line)
    {
        Coordinate coord = new Coordinate(0, 0);
        
        for (int i = 0; i < line.length(); i++)
        {
            int directionSize = 2;

            if ((line.charAt(i) == Directions.EAST_CHAR) || (line.charAt(i) == Directions.WEST_CHAR))
                directionSize = 1;

            String direction = line.substring(i, directionSize);

            i += directionSize;

            if (_debug)
                System.out.println("Direction: "+direction);

            coord = Directions.getCoordinate(direction, coord);
        }

        return coord;
    }

    private boolean _debug;
}
@@ -683,34 +683,77 @@
     
-%0A        for (int i = 0; i
+int index = 0;%0A        String remainder = line;%0A%0A        while (index
  %3C l
@@ -764,21 +764,16 @@
 length()
-; i++
 )%0A      
@@ -829,34 +829,37 @@
    if ((
-line.charAt(i) == 
+remainder.startsWith(
 Directio
@@ -869,37 +869,36 @@
 EAST
-_CHAR
+)
 ) %7C%7C (
-line.charAt(i) == 
+remainder.startsWith(
 Dire
@@ -912,13 +912,9 @@
 WEST
-_CHAR
+)
 ))%0A 
@@ -979,20 +979,25 @@
 ction = 
-line
+remainder
 .substri
@@ -999,17 +999,17 @@
 bstring(
-i
+0
 , direct
@@ -1031,17 +1031,81 @@
         
-i
+remainder = remainder.substring(directionSize);%0A            index
  += dire
@@ -1136,24 +1136,38 @@
 if (_debug)%0A
+            %7B%0A
             
@@ -1214,16 +1214,91 @@
 ection);
+%0A                System.out.println(%22Remainder: %22+remainder);%0A            %7D
 %0A%0A      

Update Renovation.java