SyllableGenerator
Generates syllables that can be sequenced into names.
Implements: ISyllableGenerator, Archigen.IGenerator<System.String>, IRandomizable
Constructors
SyllableGenerator()
Instantiates a new SyllableGenerator with no symbol generators.
Methods
Add(SymbolPosition position, System.String symbols)
Adds symbols to the specified position. Each character in the string is considered a separate symbol.
Add(SymbolPosition position, SymbolGenerator generator)
Adds a SymbolGenerator. The generator's symbols will only be used for the specified position.
Copy()
Creates a deep copy of this SyllableGenerator excluding internal instances of System.Random.
Next()
System.String
Generates a new syllable and returns it as a string.
SetChance(SymbolPosition position, System.Double chance)
Sets the probability of generating a symbol for the specified position. The default value is 1.0 (100% probability) unless changed by calling this method.
Properties
PositionChance
System.Collections.Generic.Dictionary <SymbolPosition,System.Double>
The probability of generating a symbol for a given position. The default value is 1.0 (100%) for each position as long as there are symbols available.
Random
System.Random
The instance of System.Random used to simulate randomness.
SymbolGenerators
System.Collections.Generic.Dictionary <SymbolPosition,System.Collections.Generic.List <SymbolGenerator>>
The symbol generators used to create new syllables.
Last updated