For simulating five-card draw poker scenarios
You can install the released version of fivecarddraw from Github
remotes::install_github("mkearney/fivecarddraw")
Start a round of five-card draw
## start a game with five players
p <- Poker$new(players = 5)
## shuffle
p$shuffle()
#> [90m <<shuffle>> <<shuffle>>
#> [39m[90m <<shuffle>> <<shuffle>>
#> [39m
## deal
p$deal()
#> ๐ ๐ ๐ ๐ ๐
#> ๐ ๐ ๐ธ ๐ ๐
#> ๐ ๐ ๐ ๐ธ ๐น
#> ๐ข ๐ ๐ ๐พ ๐ฉ
#> ๐ ๐ต ๐ ๐ ๐
## show cards
p$peek()
#> p1 p2 p3 p4 p5
#> "๐ถ๐๐๐๐พ" "๐ช๐ก๐ฃ๐๐ฒ" "๐น๐๐๐ซ๐ป" "๐๐ฎ๐จ๐ณ๐" "๐๐ฝ๐ผ๐ฑ๐"
## draw cards
p$draw()
#> ๐ ๐ ๐ ๐
#> ๐ ๐ฒ
#> ๐ ๐ ๐ ๐จ ๐น ๐
#> ๐ ๐ ๐ ๐ ๐ ๐
#> ๐ ๐ ๐ ๐ ๐ ๐
## show hands
p$show()
#> $p5
#> [1] "4s and 12s"
#>
#> $p4
#> [1] "9s and 15s"
#>
#> $p3
#> [1] "flush_double_draw"
#>
#> $p2
#> [1] "3s"
#>
#> $p1
#> [1] "6s and 14s"
This package was inspired by a question about five-card draw from my father-in-law. It isnโt scientific and itโs a work in progress.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.