Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.