Example #1
0
    public static int[] FindNextDeadendRight(int[] startingCoordinates)       //returns map coordinates of next dead-end cell to the right
    {
        int[] rValue = startingCoordinates;

        if (CanMoveRight(rValue))
        {
            return(FindNextDeadendRight(MapUtility.GetNext(rValue, (int)Directions.Right)));
        }
        else
        {
            return(rValue);
        }
    }
Example #2
0
    public static int[] FindNextDeadendUp(int[] startingCoordinates)       //returns map coordinates of next dead-end cell to the above
    {
        int[] rValue = startingCoordinates;

        if (CanMoveUp(rValue))
        {
            rValue = MapUtility.GetNext(rValue, (int)Directions.Up);
            return(FindNextDeadendUp(rValue));
        }
        else
        {
            return(rValue);
        }
    }
Example #3
0
    public static int[] FindNextDeadendDown(int[] startingCoordinates)      //returns map coordinates of next dead-end cell below
    {
        int[] rValue = startingCoordinates;

        if (CanMoveDown(rValue))
        {
            rValue = MapUtility.GetNext(rValue, (int)Directions.Down);
            return(FindNextDeadendDown(rValue));
        }
        else
        {
            return(rValue);
        }
    }