Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function will play a single game of a wildpoker variant, and return a visual display of the hands dealt to each player and/or community cards, a showdown matrix with the best hands chosen by each player, their score and pot percent won, as well as some game-level statistics.
1 |
ngame |
This is any supported game, such as "Seven Card Stud" or "Baseball". See
|
players |
An integer value, must be at least 2 and is limited by the number of cards that can be physically dealt. (eg, Seven Card Stud has a max of 7 players) |
wcards |
A vector of string values which are either supported wildcard aliases or individual cards. These cards are in addition to any wildcards that are a natural part of the poker game variant chosen with "ngame". The table below shows the supported aliases and their individual card vector equivalents:
|
This program shuffles a deck, deals the cards and uses the cards allowed to each player to evaluate the best poker hand for both the main hand and (if the variant includes a split hand) the alternate hand, then presents the results in a list form, suitable to just display to a user, or pass along to another program
A "pgame" list with the following structure:
$ntable |
A list of cards showing the deal visually, divided into $Extra, $Community and $Players. Extra cards are not used in hands, but affect gameplay. Community cards are shared by all players. Player cards are used only by individual players, and may include hole cards (prefixed with a #). Wildcards are suffixed by a "w". |
$showdown |
A data frame with one row per player (rowname), $maintype and $splittype represent the type of hand used by the player, eg 3-Kind or 7-High. $mainhand and $splithand show the cards used in the hand, using the same format as $ntable. $mainscore and $splitscore are calculated using the value of the cards in the hand, including "kickers", which allows two-pair Aces and 8s with Queen kicker to beat two-pair Aces and 8s with Jack kicker. The $potpct column shows how much of the pot the individual player won. The sum of all $potpct will be 1 if anybody won, but it is possible in some games for nobody to win, and nobody wins, all $potpct will equal zero. |
$summary |
A character vector with basic information $game and $wild capture the ngame and wcard parameters, $mwtype and $swtype capture the winning hands in the game |
$detail |
A numeric vector with other statistics, $mwscore and $ssscore capture the winning scores,
$msscore and ssscore capture the number of players whose hand score matched the winning hand, $mstype and
$sstype capture the number of players whose hand type matched the winning hand, $wdeck is the number of wildcards
in the deck before the deal, $wcdeal is the number of wildcards in play after the deal, pnum captures the
players parameter, and $mppct, $sppct and $bppct are used by |
This function is intended to give a sense of how an individual game plays, as well as a way to test that the underlying model is correctly dealing the cards and assigning the best hands to the showdown for each player.
Maintainer: Bradley Shanrock-Solberg greblosb@gmail.com
poker.com has an excellent reference on game variants which was the primary source for games rules not encountered in my own play.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.