Created
December 20, 2020 04:09
-
-
Save meramos/8e7532417cd27a7232ac46f93501d7c9 to your computer and use it in GitHub Desktop.
Randomize function for dressup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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