This class started as a means to create a new concept: a social poker website. I named this concept COPE (tm), the Cling-On-Poker-Experience.
It starts with a single user who invites friends to play poker with.
Only friends can create a table and start a game.
Chips used during the games are a sort of play money; it's up to the group surrounding a table to assign a value to the chips, if any. The group has to find there own way to distribute their winnings/losses; COPE itself may not have anything to do with money, so that it can be put on any webserver.
Any individual can see friends-of-friends and ask then to become direct friends, so that they too can start a game.
Any misbehaviour must have a formal treatment so that abusers to the site, the games or in fact a single user can be moved of the site for a cool down period or even permanent.
martynas - 2011-06-27 14:14:37 - In reply to message 1 from Martijn Loots
Martin is writing ;) To be honest, its Martynas in Lithuania. Thats where Im from. Was searching stuff about poker hand evaluations coz I wanted to create some php mobile site for poker playing, but failed, until I remembered that phpclasses is a nice place to find very usefull php stuff... And here I am, testing your texas holdem card dealer and evaluater.
After ~10 tries, I found out a bug, that is a bit project-biting:
tried the game for 9 players, 4 of them got 1 card of hearts,
the table cards were 4 cards of hearts, one of them - Ace of hearts.
And all 4 players were same evaluated - Winners ;)
like you understand, thats not true, one of them must be the winner, if its not straight flush, or royal flush, the highest cards are checked.
I would really like to understand your code so will try to do that, if you know the easy fix, just fix the code ;]
great great job!!!