eurodatacube / eodash

Software behind the RACE dashboard by ESA and the European Commission (https://race.esa.int), the Green Transition Information Factory - GTIF (https://gtif.esa.int), as well as the Earth Observing Dashboard by NASA, ESA, and JAXA (https://eodashboard.org)
https://race.esa.int
MIT License
89 stars 43 forks source link

Seedable bounding box randomizer for Minesweeper games #2549

Closed spectrachrome closed 2 months ago

spectrachrome commented 2 months ago

This PR enables the automatic generation of a smaller bounding box with a seedable pseudo-random location somewhere within the bounds of a location defined in minesweeperOptions.locations of ideas.js.

By default, if there is no input, the seed string will default to the current date in the format Thu Apr 18 2024. If customization is desired, the seed can be set in the URL of the website as a query parameter:

&seed=HelloIAmASeedString

Given the previously defined date format, this allows to replay any previous game, and technically you can even train yourself for the one that comes tomorrow.

lubojr commented 2 months ago

Thank you very much for the feature implementation. Merging! :tada: