Skip to content

Configurable RNG#40

Open
daxpedda wants to merge 1 commit intoelementh:masterfrom
daxpedda:configurable-rng
Open

Configurable RNG#40
daxpedda wants to merge 1 commit intoelementh:masterfrom
daxpedda:configurable-rng

Conversation

@daxpedda
Copy link

This adds a generic R to RandomColor, which defaults to SmallRng, which lets users plug in their RNG of choise. This is particularly important to games that want to save and load their RNG or ensure it remains in sync during multiplayer. SmallRng doesn't support any of those requirements.

Unfortunately this seems to be a breaking change, see rust-lang/rust#50822 (comment).

Fixes #8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let the caller choose the random number generator.

1 participant