Flip a coin
Usage
play_coin_flip(
n = NULL,
animate = rlang::is_interactive(),
header = rlang::is_interactive()
)
Arguments
- n
How many coins to flip. Defaults to
NULL
, which interactively asks how many to flip.- animate
If
TRUE
, play an animation before revealing the result. Defaults toTRUE
if the session is interactive andFALSE
otherwise.- header
If
TRUE
, prints a header for the game. Defaults toTRUE
if the session is interactive andFALSE
otherwise.
Examples
play_coin_flip(1)
#> Ⓣ
#> Tails
if (rlang::is_interactive()) play_coin_flip()