determine_winner: Determines if the player won based on their final chosen...

Description Usage Arguments Value Examples

View source: R/determine_winner.R

Description

Determines if the player won based on their final chosen door.

Usage

1
determine_winner(final.pick, game)

Arguments

final.pick

The final door chosen.

game

Random selection of goats and cars.

...

further arguments passed to or from other methods.

Value

States if the player has won or lost based on if they landed on the goat or car in the end.

Examples

1
2
3
4
5
## Win based on the original problem.
determine_winner(3, c("goat","goat","car"))

## Determines if the random choices of doors with goats and cars has won or lost.
determine_winner(final.pick = 4, create_game(goats = 5, cars = 1))

ndavis4904/montyhall documentation built on Dec. 22, 2021, 12:07 a.m.