different game ids per game

This commit is contained in:
Zutatensuppe 2020-11-08 14:49:34 +01:00
parent 3917c591b0
commit d8f9f856e6
4 changed files with 39 additions and 15 deletions

View file

@ -1,4 +1,7 @@
// get a unique id
export const uniqId = () => Date.now().toString(36) + Math.random().toString(36).substring(2)
// get a random int between min and max (inclusive)
export const randomInt = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min
@ -19,7 +22,8 @@ export const shuffle = (array) => {
}
export default {
randomInt,
choice,
shuffle,
uniqId,
randomInt,
choice,
shuffle,
}