Skip to content

Instantly share code, notes, and snippets.

@meramos
Created December 20, 2020 04:09
Show Gist options
  • Save meramos/8e7532417cd27a7232ac46f93501d7c9 to your computer and use it in GitHub Desktop.
Save meramos/8e7532417cd27a7232ac46f93501d7c9 to your computer and use it in GitHub Desktop.
Randomize function for dressup.
function randomize(){
// for each dressup item, generate a random integer and assign it to current
Object.keys(dressupState).map((item) =>
updateDressUp(item, Math.floor(Math.random() * Math.floor(dressupState[item].total)))
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment