Words Library for Unity  1.0
A C# library for building and manipulating grids in Unity Game Engine.
Gamelogic.Words.MutationGenerator Class Reference

A generator which provides a series of mutated words from a dictionary, with equal probability to each More...

+ Inheritance diagram for Gamelogic.Words.MutationGenerator:

Public Member Functions

 MutationGenerator (IWordDictionary dictionary)
 Create a new word generator. More...
 
 MutationGenerator (IWordDictionary dictionary, int minWordLength)
 Create a new word generator with a specified minimum word length. More...
 
 MutationGenerator (IWordDictionary dictionary, int minWordLength, Func< String, int > editDistanceFunction)
 Create a new word generator with a custom edit distance function More...
 
String Next ()
 Returns a word from the dictionary More...
 

Detailed Description

A generator which provides a series of mutated words from a dictionary, with equal probability to each

Constructor & Destructor Documentation

Gamelogic.Words.MutationGenerator.MutationGenerator ( IWordDictionary  dictionary)

Create a new word generator.

This generator will produce shuffles with a minimum edit distance of half the word length

Parameters
dictionaryThe dictionary to pull words from
Gamelogic.Words.MutationGenerator.MutationGenerator ( IWordDictionary  dictionary,
int  minWordLength 
)

Create a new word generator with a specified minimum word length.

This generator will produce shuffles with a minimum edit distance of half the word length

Parameters
dictionaryThe dictionary to pull words from
minWordLengthA minimum word length for the resultant mutation
Gamelogic.Words.MutationGenerator.MutationGenerator ( IWordDictionary  dictionary,
int  minWordLength,
Func< String, int >  editDistanceFunction 
)

Create a new word generator with a custom edit distance function

Parameters
dictionaryThe dictionary to pull words from
minWordLengthA minimum word length for the resultant mutation
editDistanceFunctionA function that takes an unshuffled word and returns the minimum edit distance for the mutated result

Member Function Documentation

String Gamelogic.Words.MutationGenerator.Next ( )

Returns a word from the dictionary

Returns
A randomly selected word from the dictionary

The documentation for this class was generated from the following file: