Slots R6 Class

Slots

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'.
# start the slot machine x <- Slots$new(who = "Player 1", bet = 10)
#> You have no money!
# play 1 game x$play()
#> You bet 10; you have 90 left.
#> Reels: ^ $ # #> You lost -10! #> Now you have 90 in your account. #> Do you want to `play()` again? #>
# play >1 game at a time x$play(spins = 3)
#> You bet 10; you have 80 left.
#> Reels: ^ & & #> You lost -10! #> Now you have 80 in your account.
#> You bet 10; you have 70 left.
#> Reels: # & * #> You lost -10! #> Now you have 70 in your account.
#> You bet 10; you have 60 left.
#> Reels: # & * #> You lost -10! #> Now you have 60 in your account. #> Do you want to `play()` again? #>
# clean-up delete()