Usage
Syntax: pokereval(str type, array cards, array deadcards, int iterations);
Returns array.
Explanation
Is used to calculate the odds of winning a hand in the said poker game (holdem, holdem8, omaha, omaha8, 7stud, 7stud8, 7studnsq, razz, lowball27). Iterations tells it how many times to repeat the function to get a more accurate rated output. Cards is a multi-dimensional array that includes all the players' cards (See example for usage and syntax). Dead cards are the cards that are not in use, or in the trash, depends on the currect poker game type.
The output is in this syntax:
{player1's odds, player2's odds, player3's odds, etc}
The cards given to the function is given in this syntax: First letter of the card type @ the card number/first letter of picture cards
Examples:
10s = Spades 10
kh = Hearts King
ad = Diamonds Ace
7c = Clubs 7
Example
// This is doing an eval of 2 players' hands in a Hold 'Em poker game function onCreated() { echo(pokereval("holdem", {{"6d","qc"}, {"9c","7h"}}, {"qs","kc","10c","3d","8d"}, "", 1)); }
... Would echo {1,0} since Player 1 would have a 100% winning hand with a pair of queen, while Player 2 only has a high card.
Categories
CategoryFunctionClientside
CategoryFunctionServerside