I need a method to generate 3 random numbers from 0 - 4. And I need a way to control the chance that all numbers are the same. So when I set the chance to 100% I need the method to return 1,1,1 or 2,2,2 etc. When the chance is 0% every number has to be different. I need it for a simple slot machine project.
Do you guys have any idea how to achieve this? Thank you.
Aucun commentaire:
Enregistrer un commentaire