Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Mode ¶
Mode finds a mode within a category by name. If name is empty, returns the first (default) mode.
func Normalize ¶
Normalize lowercases and replaces hyphens/underscores with spaces for fuzzy matching of CLI arguments to mode names.
func RNGFromString ¶ added in v1.5.0
RNGFromString creates a deterministic RNG seeded from an arbitrary string. The string is hashed with FNV-64a to produce a uint64 seed.
func SeededMode ¶ added in v1.5.0
func SeededMode(seed string, definitions []game.Definition) (game.SeededSpawner, string, string, error)
SeededMode selects a game type and mode from all available modes across all categories using rendezvous hashing (highest random weight). Each eligible mode is scored by hashing the seed string together with its (gameType, modeTitle) pair; the highest score wins.
This is resilient to changes in the category/mode lists: adding or removing a mode only affects seeds where the changed entry would have been the winner.
Types ¶
This section is empty.