public class DroidMovement
{
    public static final int NORTH = 1;
    public static final int SOUTH = 2;
    public static final int WEST = 3;
    public static final int EAST = 4;

    public static final int backup (int direction)
    {
        switch (direction)
        {
            case NORTH:
                return SOUTH;
            case SOUTH:
                return NORTH;
            case WEST:
                return EAST;
            case EAST:
                return WEST;
            default:
            {
                System.out.println("Error - invalid direction: "+direction);

                return 0;
            }
        }
    }

    public static final String toString (int direction)
    {
        switch (direction)
        {
            case NORTH:
                return "NORTH";
            case SOUTH:
                return "SOUTH";
            case WEST:
                return "WEST";
            case EAST:
                return "EAST";
            default:
                return "UNKNOWN";
        }
    }

    public static final String toString (String direction)
    {
        switch (direction)
        {
            case "1":
                return "NORTH";
            case "2":
                return "SOUTH";
            case "3":
                return "WEST";
            case "4":
                return "EAST";
            default:
                return "UNKNOWN";
        }
    }

    private DroidMovement ()  // prevent instantiation
    {
    }
}
@@ -211,16 +211,25 @@
 t backup
+Direction
  (int di
@@ -654,32 +654,483 @@
        %7D%0A    %7D%0A%0A
+    public static final Coordinate%5B%5D getNextPositions (Coordinate coord)%0A    %7B%0A        Coordinate%5B%5D coords = new Coordinate%5B4%5D;%0A%0A        // N, E, S, W%0A%0A        coords%5B0%5D = new Coordinate(coord.getX(), coord.getY() -1);%0A        coords%5B1%5D = new Coordinate(coord.getX() -1, coord.getY());%0A        coords%5B2%5D = new Coordinate(coord.getX(), coord.getY() +1);%0A        coords%5B3%5D = new Coordinate(coord.getX() +1, coord.getY());%0A%0A        return coords;%0A    %7D%0A%0A
     public stati

Update DroidMovement.java