determine_winner: Determine if the contestant won the Monty Hall Problem game.

Description Usage Arguments Details Value Examples

View source: R/monty-hall-problem.R

Description

determine_winner() determines if the contestants final door selection contained a car (win) or a goat (lose).

Usage

1
determine_winner(final.pick, game)

Arguments

final.pick

= the argument which has the returned door from the change_door() function. game = the argument containing the positions of the goats and car from the create_game() function

Details

After the contestant makes their final door selection in the "Let's Make a Deal" game show, Monty Hall reveals whether the contestants door contains a car or goat.

Value

The function returns a length 3 or 4 character vector indicating whether the contestant won or loss the game.

Examples

1
  determine_winner( final.pick, game )

herbertm533/montyhall2 documentation built on Sept. 21, 2020, 12:03 a.m.