I am trying to randomly generate a deck of cards. The code I am using is almost correct, however it is duplicating one random card. In other words, I can generate 50 unique cards but I still have 2 that are the same and I can't figure out why just 2 cards are slipping through.
Here is the part of my code for generating the cards:
What makes you think you're generating a duplicate card? If I add enough code to get yours to compile and sort the resulting array to make duplicates obvious, I don't get any duplicates.