open_goat_door: Host opens a goat door

Description Usage Arguments Details Value Examples

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

Description

open_goat_door(game,a.pick) return a door that contain a goat behind it.

Usage

1
open_goat_door(game, a.pick)

Arguments

game

Character, car or one of the goats

a.pick

Numeric, door numbers

Details

Before the selected door is opened however, someone who knows what's behind the doors (Monty Hall) opens one of the other two doors, but it can't be a door the contestant has already selected . So it must be a door that is not a car and not a current contestant selection.

Value

a number between 1 and 3 that contain a goat behind it

Examples

1
2
3
game <- create_game()
a.pick <- select_door()
open_goat_door ( game, a.pick )

Rami-Assaad/montyhall documentation built on Dec. 18, 2021, 9:52 a.m.