determine_winner: Determine game outcome

Description Usage Arguments Details Value

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

Description

1
 Determine game outcome

Usage

1
determine_winner(final.pick, game)

Arguments

final.pick:

the integer returned from change_doors

 game: the initial set up of the game some
 combination of "goat","goat","car"

Details

1
2
3
4
5
6
7
8
 the function compares the value to final.door from
 change_doors against the values "car" and "goat"

 if there is a match with the door and "car" then the
 function returns "WIN"

 if there is a match with the door and "goat" then
 the function returns "LOSE"

Value

1
2
 [1] wIN
 [1] LOSE

AmyTrumpower/montyhall documentation built on Dec. 17, 2021, 8:47 a.m.