C# Class MBGen.WordList

ファイルを表示 Open project: TheBerkin/MoistBanana Class Usage Examples

Public Properties

Property Type Description
Classes List>.Dictionary
Description string
Subtypes string[]
Symbol char
Title string
Words string[][]

Public Methods

Method Description
GetRandomIndex ( LongRandom rand, string className ) : int
GetRandomWord ( LongRandom rand, string subtype, string className, WordFormat format ) : string
GetRandomWordMultiClass ( LongRandom rand, string subtype, WordFormat format ) : string
GetWordByIndex ( int index, string subtype, WordFormat format ) : string
Merge ( WordList list ) : bool
RandomizeDistWeights ( LongRandom rand, int factor ) : void
WordList ( BinaryReader reader, int &total ) : System
WordList ( string path, int &total ) : System

Private Methods

Method Description
Error ( string type ) : string
Format ( string input, WordFormat format ) : string
GetMultiClassList ( ) : List
Load ( BinaryReader reader, int &total ) : void
LookForSubtype ( string name ) : int
PickByWeight ( List items, LongRandom rand ) : int
PickByWeight ( string className, LongRandom rand ) : int
TotalWeights ( List items ) : int
TotalWeights ( string className ) : int

Method Details

GetRandomIndex() public method

public GetRandomIndex ( LongRandom rand, string className ) : int
rand LongRandom
className string
return int

GetRandomWord() public method

public GetRandomWord ( LongRandom rand, string subtype, string className, WordFormat format ) : string
rand LongRandom
subtype string
className string
format WordFormat
return string

GetRandomWordMultiClass() public method

public GetRandomWordMultiClass ( LongRandom rand, string subtype, WordFormat format ) : string
rand LongRandom
subtype string
format WordFormat
return string

GetWordByIndex() public method

public GetWordByIndex ( int index, string subtype, WordFormat format ) : string
index int
subtype string
format WordFormat
return string

Merge() public method

public Merge ( WordList list ) : bool
list WordList
return bool

RandomizeDistWeights() public method

public RandomizeDistWeights ( LongRandom rand, int factor ) : void
rand LongRandom
factor int
return void

WordList() public method

public WordList ( BinaryReader reader, int &total ) : System
reader System.IO.BinaryReader
total int
return System

WordList() public method

public WordList ( string path, int &total ) : System
path string
total int
return System

Property Details

Classes public_oe property

public Dictionary> Classes
return List>.Dictionary

Description public_oe property

public string Description
return string

Subtypes public_oe property

public string[] Subtypes
return string[]

Symbol public_oe property

public char Symbol
return char

Title public_oe property

public string Title
return string

Words public_oe property

public string[][] Words
return string[][]