Closed jwyatt1999 closed 2 years ago
This is waiting on @Bsubs 's flask PR (from this branch https://github.com/jwyatt1999/CITS3403_Cartographers/tree/JooKai_Flask_App) to be merged, then I will change
if (isDaily) {
seed = xmur3(currentDate.getDate().toString() + currentDate.getMonth().toString() + currentDate.getYear().toString());
}
in startGame(isDaily)
to grab the current date from the flask server and convert that into a string (to prevent users from changing their local time to get a different seed).
Hey @Bsubs , this is now ready for review. I've tested this locally and even when changing my computer's date it still gave the same date from the server.
Looks good :)
In this PR I have replaced the existing pseudo-random number generator (which couldn't be seeded) with a new pseudo-random number generator that can be seeded. I have also added the functionality that allows us to start freeplay games and daily games (the primary difference being that they use different seeds).