wpgraphs: Wild Poker Graphs for Best Hand Analysis

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/stats.R

Description

This function presents an array of graphs which indicate how hand types compare for a given wild poker variant.

Usage

1
2
wpgraphs(gstat, ngame=NULL, players=NULL, wcnum=NULL, 
                stats=FALSE, gtype="Default", split="Vertical")

Arguments

gstat

a gstat (graph stats) object generated by the wpstats function. If this parameter exists, ngame, players and wcnum are not used.

ngame

This is any supported game, such as "Seven Card Stud" or "Baseball". See wpsupportedgames.

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)

wcnum

A standardized set of wildcard combinations, valid values are 0:7. unlike the wcard parameter in wpgame and wpstats, each numeric value matches one and only one set of wildcards:

  • 0 = no wildcards

  • 1 = "Suicide King" aka "KH"

  • 2 = "One Eyed Jacks" aka c("JH", "JS")

  • 3 = c("Suicide King", "One Eyed Jacks")

  • 4 = "Deuces" aka c("2H", "2C", "2D", "2S")

  • 5 = c("Deuces", "Suicide King")

  • 6 = c("Deuces", "One Eyed Jacks")

  • 7 = c("Deuces", "Suicide King", "One Eyed Jacks")

stats

if TRUE, return the gstat list instead of generating graphs

gtype

Controls which graphs are generated:

  • "Default" = 4x4 graph array as describede below

  • "Confidence" = Confidence graph for Main and, if any, Split hand

  • "Hands" = Hands Won graph for Main and, if any, Split hand

split

For gtype = "Confidence" or "Hands", controls how split hand graphs behave:

  • "Vertical" = Split Hand graph displays beneath Main Hand graph

  • "Horizontal" = Split Hand graph displays to right of Main Hand graph

Details

This function either accepts input from wpstats or more typically matches game variant details (ngame, players, wcnum) to pre-calculated gstat lists. All supported game combinations with 0-7 wildcards and 2-8 players (or less if 8 players aren't possible) have been precalculated.

Precisely what is graphed depends on whether the game has split hands or not, and the graphic device needs a sufficiently large window to show a 4x4 array of graphs with reasonable detail.

Value

if stats = TRUE, prints the gstat list - either gstat parameter, or the precalculated gstat object queried by the ngame, player and wcnum combination.

if stats = FALSE, generates a 4x4 graph array.

Example1

Precalculated variant with emergent wildcards and main hand only:

wpgraphs(ngame = "Follow the Queen", players = 6, wcnum = 1)

graphftq.png

Example2

Just the Confidence graphs for Example 1:

wpgraphs(ngame = "Follow the Queen", players = 6, wcnum = 1, gtype = "Confidence")

graphftqc.png

Example3

Custom variant with split hand and nonstandard win conditions:

wpgraphs(wpstats("High Chicago", 4, "Dr Pepper", numdeal = 10, seed = 100))

graphhcdp.png

Example4

Just the Hands Won graph for example 3:

wpgraphs(wpstats("High Chicago", 4, "Dr Pepper", numdeal = 10, seed = 100), gtype = "Hands")

graphhcdph.png

Note

This function is the primary point of the wildpoker package, intended to allow a user to rapidly evaluate the way hands change in value as wildcards, players or game variants change.

Author(s)

Maintainer: Bradley Shanrock-Solberg greblosb@gmail.com

References

poker.com has an excellent reference on game variants which was the primary source for games rules not encountered in my own play.

See Also

wpstats

Examples

1
2
3
4
5
6
7
8
9
# These examples show the gstat output option.  For the graphs of these examples,
# see \bold{value} section, above.
#
# example of normal wpgraphs use.
wpgraphs(ngame = "Follow the Queen", players = 6, wcnum = 1, stats = TRUE)

# example of using wpstats to generate a nonstandard combination
# note that if a gstat object is provided (by wpstats), the ngame, players, wcnum aren't used 
wpgraphs(wpstats("High Chicago", 4, "Dr Pepper", numdeal = 10, seed = 100), stats = TRUE)

wildpoker documentation built on May 2, 2019, 7:33 a.m.