Fixed daily seed
This commit is contained in:
parent
65406a222d
commit
69d3b2532c
|
@ -60,7 +60,7 @@ export function shuffle<T>(array: T[]): T[] {
|
||||||
function initDailyPRNG(): () => number {
|
function initDailyPRNG(): () => number {
|
||||||
// Prefix the seed when in dev to avoid spoiling myself while working on it
|
// Prefix the seed when in dev to avoid spoiling myself while working on it
|
||||||
const prefix = import.meta.env.DEV ? 'dev-' : ''
|
const prefix = import.meta.env.DEV ? 'dev-' : ''
|
||||||
const hashed = hashStr(prefix + GAME_STARTING_DATE)
|
const hashed = hashStr(prefix + getCurrentDate().toISOString().slice(0, 10))
|
||||||
return mulberry32(hashed)
|
return mulberry32(hashed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user