play_game: Wrap the game steps into a single function.

Description Usage Arguments Details Value Examples

View source: R/newscriptmontyhall.R

Description

play_game() wraps the game steps into a single function which includes within it all the required steps.

Usage

1

Arguments

...

numeric and logical vectors of the game steps.

Details

This is a wrap function that includes within it all other functions and by the end we can know depending on whether the contestant has chose to switch or stay whther he is a winner or loser.

Value

the result of the game which is whether the contestant has won or lose.

Examples

1

ZEINAZEINEDDINE/montyhall documentation built on Sept. 20, 2020, 12:44 a.m.