Poker R6 Class

Poker

Format

An object of class R6ClassGenerator of length 24.

Examples

set.seed(101315) setup()
#> No records found. #> Storing player records at '/Users/anthony/Documents/casino/docs/reference/.casino'
#> Updating value for environment variable 'CASINO_FILE'.
# draw poker x <- Poker$new(who = "Player 1", type = "draw", bet = 10)
#> You have no money!
x$play()
#> You bet 10; you have 90 left.
#> Hand: 8 ♥, 3 ♥, 2 ♠, 6 ♦, 8 ♠ #> Choose cards to `hold()`` and then `draw()`.
x$hold(1, 2, 5)
#> Hand: 8 ♥, 3 ♥, 2 ♠, 6 ♦, 8 ♠ #> Choose cards to `hold()`` and then `draw()`.
x$draw()
#> Hand: 8 ♥, 3 ♥, 8 ♠, J ♣, 6 ♥ #> Result: one pair #> You lost -10! #> Now you have 90 in your account. #> Do you want to `play()` again?
# stud poker (bet 20) x <- Poker$new(who = "Player 1", type = "stud", bet = 20)
#> Loading player profile...
x$play()
#> You bet 20; you have 70 left.
#> Hand: 2 ♦, 3 ♦, A ♠, 3 ♥, K ♦ #> Result: one pair #> You lost -20! #> Now you have 70 in your account. #> Do you want to `play()` again?
# clean-up delete()