Hi.
I want make Memory match game but i don't know what is algorithm for generate random picture without repeating more than two time.
anyone can guide me?
Thanks.
Hi.
I want make Memory match game but i don't know what is algorithm for generate random picture without repeating more than two time.
anyone can guide me?
Thanks.
Do you mean generate (create from scratch), or do you mean choose randomly?
If you mean choose randomly, you can look into various shuffle algorithms, e.g. this one:
Hello to all my stalkers.
34 minutes ago, behdadsoft said:I want choose randomly without repeating.
Then you want to shuffle. Take a look at the link I posted
Take your list of images (2 of each image in the list because you want to find a pair), and then shuffle the list.
35 minutes ago, behdadsoft said:what is scratch?
"Create from scratch" means "to create something from nothing". In this case, starting with a blank image, and creating/painting an image using just code. But this wasn't what you wanted to do, so don't worry about it =)
Hello to all my stalkers.