You can use an array; each element represents a pin.
Once you have randomly selected an element, mark it in the array. Next time that you pick a random number, check if it's marked in the array or not.
You can use an array; each element represents a pin.
Once you have randomly selected an element, mark it in the array. Next time that you pick a random number, check if it's marked in the array or not.