determine_winner: Determine Winner Function

Description Usage Arguments Details Value Examples

View source: R/montyhall.R

Description

The function determine_winner(), determines whether the player's final pick is a goat door or a car door.

Usage

1
determine_winner(final.pick, game)

Arguments

This

function contains two arguments as described in the details. If final.pick equals "car", then the player wins. If final.pick equals "goat", thenn the player loses.

Details

If the player's final.pick is equal to "car" then they win. If their final.pick is equal to "goat" then they lose.

Value

This function returns a length one logical character vector. The choices are "WIN" or "LOSE".

Examples

1

RTrehern-ASU/montyhall documentation built on Sept. 22, 2020, 12:42 a.m.