play_game: Monty Hall game where user defines number of goats and cars

Description Usage Arguments Value Examples

View source: R/play_game.R

Description

Monty Hall game where user defines number of goats and cars

Usage

1
play_game(goats, cars)

Arguments

goats

Numer of goats that will be hidden behind doors.

cars

Number of cars that will be hidden behind doors.

...

further arguments passed to or from other methods.

Value

The number of goats added to the number of cars makes the total number of doors to choose from.

Examples

1
2
3
4
5
## Runs a single observation of the Monty Hall problem with 2 goats and 1 car.
play_game(goats = 2, cars = 1)

## Runs a single observation of the Monty Hall problem with 10 goats and 5 cars.
play_game(10, 5)

ndavis4904/MontyHall documentation built on Sept. 10, 2021, 11:04 a.m.