title: Non-repetitive random numbers in Objective-C
body: <p>I have searched through the internet but I haven't find any straightforward answer. What I am trying to develop is basically a three same-object matching game. I have 3 UIButtons in one row. (each of these 3 buttons have a black hat icon).There are gonna be 3 unique types of hats. There are 3 rows of three items each. I want to touch the first hat  and reveal a number from 0 to 2 (Let's say 1). After choosing the first hat, I want the second hat to generate a number between the 2 remained numbers( the choices are 0 and 2, let's say 2). And finally when I touch the third hat, it will generate the last remainder (number 0 in this example).The main reason for picking the numbers is because I want a certain number to represent a unique "Hat", so when I pick a hat with the number 1, a blue hat will pop out, with the number 0 a red hat etc... I have implemented the whole animation and stuff. I am just struggling in the "Unique random number picking". I am sure arrays will be a part of the "Random logic" but I haven't managed to implement it correctly... Any help would be HIGHLY appreciated :) Thank you all!</p>