Zomis / Games

Many kinds of games, playable in both multiplayer or local play. Replays, spectator mode, and AIs.
https://games.zomis.net
MIT License
17 stars 5 forks source link

Dynamically inject randomness #293

Open Zomis opened 2 years ago

Zomis commented 2 years ago

When a game checks for saved randomness-state, it would be useful if while playing one could inject what one would want the value to be.

Something like the following:

Zomis commented 2 years ago

This would require that the methods in replayable be made into suspending functions, which would cascade through all games that are currently using randomness and throughout many places in the internal codebase.

I feel like it can be interesting to keep in mind, but not worth the effort right now.

Zomis commented 1 year ago

A possible way to solve this would be to add a loop like this: