
-----------------------------------
leu_raz
Wed Jan 05, 2005 9:14 pm

Poker Game
-----------------------------------
Hello there compsci.ca team.
I am starting a Poker Game. I will work in Java(RTP....)
The thing is that I do no know how to make my program
'understand' when it's gonna have a Pair/Flush/etc.
May I hvae your suggestions please?
And basically how to do it without mouse,i know it's gonna be a crappy game in the end because the mouse really helps you out a lot.
Thank you very much :)

-----------------------------------
Tony
Wed Jan 05, 2005 9:45 pm


-----------------------------------
the trick is to sort the cards in order by their face value. I don't remember if Java has any build in sorting algorythms, it shouldn't matter... not that many cards.

then for a pair, you just check if any two adjesent cards are of the same value

for (int i=1; i