You can play Blackjack against the dealer.
library(casino)
# Setup a new casino
setup(".wynn")
#> No records found.
#> Storing player records at '.wynn'
#> Updating value for environment variable 'CASINO_FILE'.
# Sit at the blackjack table with default bet of 25
x <- Blackjack$new(who = "Gritty", bet = 25)
#> You have no money!
# Play a hand
x$play()
#> You bet 25; you have 75 left.
#> Player Hand: {8, 2} = 10
#> Dealer Hand: {?, 6} = ?
#> Will you `hit()` or `stand()`?
x$hit()
#> Player Hand: {8, 2, 8} = 18
#> Dealer Hand: {?, 6} = ?
#> Will you `hit()` or `stand()`?
x$stand()
#> Game over! dealer wins
#> You lost -25!
#> Now you have 75 in your account.
# Play another
x$play()
#> You bet 25; you have 50 left.
#> Player Hand: {6, K} = 16
#> Dealer Hand: {?, Q} = ?
#> Will you `hit()` or `stand()`?
x$stand()
#> Game over! dealer bust
#> You won 25!
#> Now you have 100 in your account.
# Play one last hand, and bet it all!
x$play(bet = 100)
#> You bet 100; you have 0 left.
#> Player Hand: {4, 6} = 10
#> Dealer Hand: {?, 5} = ?
#> Will you `hit()` or `stand()`?
x$hit()
#> Player Hand: {4, 6, Q} = 20
#> Dealer Hand: {?, 5} = ?
#> Will you `hit()` or `stand()`?
x$stand()
#> Game over! dealer wins
#> You lost -100!
#> Now you have 0 in your account.