package
Version:
v0.0.0-...-6e72cc2
Opens a new window with list of versions in this module.
Published: Mar 11, 2023
License: GPL-3.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package random contains core and general purpose functionalities for the randomizer.
An Id represents the ID of an in-game entity. Its value is the integer representation of its original hex value.
NewId creates a new Id with the given integer as its value. If the given integer is not in the range of valid IDs then an error will be returned.
RandomId creates a new random Id using a certain Seed within the given Id range (inclusive).
type Randomizer interface {
Randomize() error
}
A Randomizer implements the logic to randomize a certain game entity.
A Seed represents the seed of a whole randomizer process to guarantee reproducible randomization results.
NewSeed creates a new Seed based on the current time.
SeedFrom creates a new Seed based on the given string's checksum.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.