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

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

+ Inheritance diagram for Gamelogic.Words.ShuffleGenerator:

Public Member Functions

 ShuffleGenerator (IWordDictionary dictionary)
 Create a new word generator. More...
 
 ShuffleGenerator (IWordDictionary dictionary, Func< String, int > hammingFunction)
 Create a new word generator with a custom hamming distance function More...
 
String Next ()
 Returns a word from the dictionary More...
 

Detailed Description

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

Constructor & Destructor Documentation

Gamelogic.Words.ShuffleGenerator.ShuffleGenerator ( IWordDictionary  dictionary)

Create a new word generator.

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

Parameters
dictionaryThe dictionary to pull words from
Gamelogic.Words.ShuffleGenerator.ShuffleGenerator ( IWordDictionary  dictionary,
Func< String, int >  hammingFunction 
)

Create a new word generator with a custom hamming distance function

Parameters
dictionaryThe dictionary to pull words from
hammingFunctionA function that takes an unshuffled word and returns the minimum hamming distance for the shuffled result

Member Function Documentation

String Gamelogic.Words.ShuffleGenerator.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: