Learn R Programming

player (version 0.1.0)

play: Play a game in the console

Description

Interact with the game by typing commands into the console and pressing enter.

Usage

play(game = NULL, ...)

Value

Calls the selected game function.

Arguments

game

The name of a game to play. If NULL, you can choose a game interactively in the console.

...

Additional arguments passed to the chosen game.

Examples

Run this code
if (rlang::is_interactive()) play()

play("magic_8_ball")

Run the code above in your browser using DataLab