Word Game Builder 2.0.1f2
Reference Manual
Static Public Member Functions | Properties | List of all members
WordChecker Class Reference

Helper methods to check for a word in a language, using letter tiles as input. More...

+ Collaboration diagram for WordChecker:

Static Public Member Functions

static void AbortAllTasks ()
 Aborts all asynchronous tasks. More...
 
static WordGameResult CheckWord (IList< ILetterTile > letterTiles, bool ordered=true, WordGameLanguage language=null, int maxWordLength=0, int maxIterations=0)
 Checks the input word against a language dictionary. More...
 
static AsyncTask CheckWordAsync (IList< ILetterTile > letterTiles, System.Action< WordGameResult > callback=null, bool ordered=true, WordGameLanguage language=null, int maxWordLength=-1, int maxIterations=-1, bool forceAsync=false)
 Checks the input word against the dictionary, asynchronously on another thread. More...
 
static string GetWord (IList< ILetterTile > letterTiles)
 Gets the word from a list of a letter tiles. More...
 

Properties

static int maxIterations [get, set]
 The maximum amount of iterations for any permutation checks. More...
 
static int maxWordLength [get, set]
 The maximum word length for any word checks. More...
 
static int taskCount [get]
 Gets the amount of currently running asynchronous tasks. More...
 

Detailed Description

Helper methods to check for a word in a language, using letter tiles as input.

Member Function Documentation

static void AbortAllTasks ( )
inlinestatic

Aborts all asynchronous tasks.

+ Here is the caller graph for this function:

static WordGameResult CheckWord ( IList< ILetterTile letterTiles,
bool  ordered = true,
WordGameLanguage  language = null,
int  maxWordLength = 0,
int  maxIterations = 0 
)
inlinestatic

Checks the input word against a language dictionary.

Returns
A WordGameResult representing the results of the lookup operation.
Parameters
letterTilesThe letter tile input for the lookup operation.
orderedIf true, performs a check on the tiles, in order. If false, performs a permutation check on every combination of the letter tiles. Defaults to true.
languageThe language to check the word against. Defaults to the current language.
maxWordLengthThe maximum word length for the lookup operation. Defaults to WordChecker.maxWordLength.
maxIterationsThe maximum amount of iterations for any permutation checks. Defaults to WordChecker.maxWordLength.
static AsyncTask CheckWordAsync ( IList< ILetterTile letterTiles,
System.Action< WordGameResult callback = null,
bool  ordered = true,
WordGameLanguage  language = null,
int  maxWordLength = -1,
int  maxIterations = -1,
bool  forceAsync = false 
)
inlinestatic

Checks the input word against the dictionary, asynchronously on another thread.

Returns
An Task representing the asynchronous task.
Parameters
letterTilesThe letter tile input for the lookup operation.
callbackThe method to call upon completion. This method must take a WordGameResult as the only argument.
orderedIf true, performs a check on the tiles, in order. If false, performs a permutation check on every combination of the letter tiles.
languageThe language to check the word against.
maxWordLengthThe maximum word length for the lookup operation. Overrides WordChecker.maxWordLength.
maxIterationsThe maximum amount of iterations for any permutation checks. Overrides WordChecker.maxWordLength.
forceAsyncIf true, this method will always execute on another thread.

If less than 4 tiles are specified and forceAsync = false, this method is run on the same thread that it is called and returns an empty task.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static string GetWord ( IList< ILetterTile letterTiles)
inlinestatic

Gets the word from a list of a letter tiles.

Does not perform any dictionary checks.

Parameters
letterTilesThe list of letter tiles to turn into a word.
Returns
A word from the list of letter tiles.

+ Here is the caller graph for this function:

Property Documentation

int maxIterations
staticgetset

The maximum amount of iterations for any permutation checks.

int maxWordLength
staticgetset

The maximum word length for any word checks.

Inputs above this value will be truncated.

int taskCount
staticget

Gets the amount of currently running asynchronous tasks.