allegroflare / allegro_flare

Application toolkit for Allegro 5
https://clubcatt.com/allegroflare
MIT License
35 stars 6 forks source link

Fix Random reproducibility when using different member functions #213

Closed MarkOates closed 2 years ago

MarkOates commented 2 years ago

Great description of the problem here. This PR fixes this.

I opted for a simple hashing value on a string to produce a number to add to the primary_seed for each random number generator. That way if the cascaded seeding in set_seed() were to change order, it wouldn't change the value of the outputs.