Method CheckForWord
CheckForWord(IGrid<GridPoint2, string>, IWordDictionary, GridPoint2, Func<GridPoint2, int, GridPoint2>, int)
Check if any words can be made starting at this block and moving in any direction outwards
public static List<GridPoint2> CheckForWord(IGrid<GridPoint2, string> grid, IWordDictionary dictionary, GridPoint2 center, Func<GridPoint2, int, GridPoint2> directionFunction, int directionCount)
Parameters
grid
IGrid<GridPoint2, string>The grid to search
dictionary
IWordDictionaryThe dictionary we're searching
center
GridPoint2The point to search from
directionFunction
Func<GridPoint2, int, GridPoint2>A function to walk the given grid in a direction specified by some index
directionCount
intThe number of valid indices to
directionFunction
Returns
- List<GridPoint2>
The list of points that describe the word found, or an empty list if none were.
CheckForWord(AbstractGrid<GridPoint2, string>, IWordDictionary, GridPoint2, IList<GridPoint2>)
Check if any words can be made starting at this block and moving in the given directions
public static List<GridPoint2> CheckForWord(AbstractGrid<GridPoint2, string> grid, IWordDictionary dictionary, GridPoint2 center, IList<GridPoint2> directions)
Parameters
grid
AbstractGrid<GridPoint2, string>The grid to search
dictionary
IWordDictionaryThe dictionary we're searching
center
GridPoint2The point to search from
directions
IList<GridPoint2>The directions in which to search
Returns
- List<GridPoint2>
The list of points that describe the word found, or an empty list if none were.
CheckForWord(AbstractGrid<GridPoint2, string>, IWordDictionary, GridPoint2)
Check if any words can be made starting at this block and moving in any direction outwards
public static List<GridPoint2> CheckForWord(AbstractGrid<GridPoint2, string> grid, IWordDictionary dictionary, GridPoint2 center)
Parameters
grid
AbstractGrid<GridPoint2, string>The grid to search
dictionary
IWordDictionaryThe dictionary we're searching
center
GridPoint2The point to search from
Returns
- List<GridPoint2>
The list of points that describe the word found, or an empty list if none were.