R/validatingCreatingContestants.R

Defines functions validateCreatingContestants

Documented in validateCreatingContestants

#' Helper Function For creatingContestants Functions
#' 
#' @export 
#' 

validateCreatingContestants = function(contestantsInput){
    errorMessage = "contestants MUST be a whole number greater than 1"
    if(!is.numeric(contestantsInput)){
        stop(errorMessage)
    }
    if(contestantsInput %% 1 != 0){
        stop(errorMessage)
    }

    if(contestantsInput < 2){
        stop(errorMessage)
    }
}
NotThatKindODr/Are-You-The-One-Sim documentation built on Dec. 17, 2021, 12:51 p.m.