2011-05-22, 01:43 PM
I would go with Fiel's suggestion of having a deck object and drawing cards from it. That way, generating a card always only takes 1 try, as opposed to your current method which has a worst-case time of infinity (in theory, if the random generator keeps picking the same card over and over). The effect if you're only generating a 5-card hand is small, but as Fiel also mentioned, having a deck object is more realistic as the two players shouldn't both be holding the same card, not to mention better OOP.

