I have a script that randomly puts image art layers together and generates them, there are multiple races in the script for example a cat and a dog so their image layers dont get mixed together. Now what I want to achieve is having the races randomly generated but with some kind of weighing like for example 70% should be race 1 and 30% should be race 2.
For example right now it generates it like this: First it generates 50 of race 1 and then generates 50 of race 2, I would like it so it randomly switching back and forth between the races while still having certain percentages set. https://github.com/HashLips/nerdy_coder_clones_tutorial/blob/main/generative-art-opensource/index.js