I'm collecting practical use cases for random.seed() functions. Here's an example of what I'm talking about, in pseudocode:
random.seed(12345);
random() // 0.221038...
random() // 0.858932...
// Switch seeds, get different results
random.seed(6789);
random() // 0.633732...
random() // 0.939101...
// Use original seed, get original results
random.seed(12345);
random() // 0.221038...
random() // 0.858932...
Please comment below with use cases for this function. I've started off with my own use case.
This can be very useful for unit/integration tests of systems that use pseudorandom functions. For example, if I'm building a combat system in a game, I'd like to make sure that the dice roll the same way every time I run tests against the combat system. This way I can verify the expected outcome of combat every time.