open_goat_door: Open a goat door in a Monty Hall Problem game.

Description Usage Arguments Details Value Examples

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

Description

open_goat_door() opens one of the doors that contains a goat after the contestant has made their intial door choice.

Usage

1
open_goat_door(game, a.pick)

Arguments

game

= the argument containing the positions of the goats and car from the create_game() function a.pick = the arguement containing the contestants initial door selection from the select_door() function

Details

After the contestant chooses a door in the "Let's Make a Deal" game show, Monty Hall will reveal one of the goat doors to the contestant.

Value

The function returns a length 1 numeric vector indiciting whether the opened door containing the goat was door 1, 2, or 3. This function will not open the door with the car behind it or the door that was the contestants initial pick.

Examples

1
  open_goat_door( game, a.pick )

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