lundi 4 avril 2022

How to not repeat the same outcome of random generated numbers?

New to Swift here. Making my first app!

I have created some random numbers with: let randomQue = Int.random(in: 1...10)

Then I have a button that shows the result. However sometimes the same result comes twice. Is there any way to add code so that the Int.random(in: 1...10) does not show same result twice (or not at all)?




Aucun commentaire:

Enregistrer un commentaire