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 toTRUEif the session is interactive andFALSEotherwise.- header
If
TRUE, prints a header for the game. Defaults toTRUEif the session is interactive andFALSEotherwise.
Examples
play_coin_flip(1)
#> Ⓣ
#> Tails
if (rlang::is_interactive()) play_coin_flip()
