Deck {casino}R Documentation

Deck R6 Class

Description

Deck R6 Class

Usage

Deck

Format

An object of class R6ClassGenerator of length 24.

Examples

# create a new deck
x <- Deck$new()
x

# draw a card
x$draw(1)
x

# draw 10 cards
x$draw(10)

# check how many cards are left
x$cards_left()

# reset the deck
x$shuffle()
x

# create a deck composed of 5 decks
x <- Deck$new(decks = 5)
x

[Package casino version 0.1.0 Index]