Description Usage Arguments Value Examples
View source: R/open_goat_door.R
Randomly chooses one of the doors with a goat that is not the selected door
1 | open_goat_door_orig(game, a.pick)
|
game |
Random assortment of goats and cars |
a.pick |
The player selected door |
door.choices |
Number of total possible doors |
... |
further arguments passed to or from other methods. |
This function will open a random door that is not the door the player has selected as well as one that has a goat hidden behind.
1 2 3 4 5 | ## Opens a single door between 1 and 3 from the original problem
open_goat_door_orig(create_game_orig(), 2)
## Randomly selects 1 door out of any remaining doors that fit the above condition.
open_goat_door(create_game(5, 3), 2, 8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.