Okay, so I'm doing a class where I have to make a card game. I decided to put a spin on it and do a slot machine but it uses Cards instead of the normal things for it. I have an issue though, that being that I do not know how to randomize the slots so that they pick a random image every time. I'm using four images next to each other, the one on the far right being the handle to pull. I just need help with figuring out how to properly cause the images to be randomized each time. I can very well do the rest. Any help is appreciated. (Edit: Sorry for any rambling or overexplaining, I have ADHD.)
See here for working with lists. You will find a shuffle function in the first link
Learn about using lists:
- Lists by Sajal Dutta
- Lists appinventor.org
You need to init a global list with the file names of the card images you collected in the Media folder.
Use a Button for the handle.
When Clicked, for each of the three images, set its .Picture to a randomly chosen item from that global list of image files.