Description Usage Arguments Details Value Examples
open_goat_door
is the function which simulates the game show host
opening one of the doors that is known to have a goat behind it.
1 | open_goat_door(game, a.pick)
|
This |
function contains two arguments. The host should never open the door
picked by the contestant and should never open the car door. To ensure
this, the argument uses the 'not equal' operator. The door the host opens
is not equal to |
After the player makes their initial door selection, the host will oepn one of the goat doors. At this point in the game there are still two closed doors; the one picked by the contestant and door #3.
This function returns a length one character vector which is a number
between 1 and 3 and represents a known goat door. The returned value is
assigned to variable opened.door
.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.