Checking repeating values in an Array?

November 10, 2010 at 15:56:56
Specs: Windows 7
I am writing a code for the card game Go Fish, I was wondering how it would be possible to check a players hand to see if they have 4 of the same card... and if so how to remove them from the hand array.

See More: Checking repeating values in an Array?

Report •

#1
November 11, 2010 at 08:04:13
Easiest method: Keep the players' hands sorted, then check card X, and X + 3. If they match, then you've got four of a kind.

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question