Poker R6 Class
Poker
An object of class R6ClassGenerator
of length 24.
#>#>#># draw poker x <- Poker$new(who = "Player 1", type = "draw", bet = 10)#>x$play()#>#> 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)#>x$play()#>#> 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()