Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to implement a repeatable random number generator?

0
Posted

How to implement a repeatable random number generator?

0

You can make a random number generator repeatable by setting it’s seed. At the start of a game (on the initial turn) you should generate a seed randomly and save it. To allow loading to an arbitrary turn you should initialise the random number generator seed at the start of each turn as a function of the game seed and the turn.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123