Jump to content

Poker


o0Zero10o

Recommended Posts

The mathematics side of the poker... Giving the spades,hearts etc... values and the rest of the deck a value.

And the win side of it Royal Flush, straight, Two Pair etc... [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /]
Link to comment
https://forums.phpfreaks.com/topic/13017-poker/#findComment-50377
Share on other sites

I'm not quite sure, but I think (s)he's asking how to represent a card in php. The way I did it when I made a game in C++ a while back is to have the integer part be the face value and the decimal part be the suit. For example:

2.1 Would be a 2 of (let's say) clubs.
13.3 Would be a king of hearts.
9.1 Would be a 9 of clubs.

And so on.

And if you aren't sure how to go about checking for wins, I don't think you're ready to make a game like poker. I would recommend trying blackjack first, if you're new to php and programming in general.
Link to comment
https://forums.phpfreaks.com/topic/13017-poker/#findComment-50422
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.