validate_bet: Test Whether Action Is Valid

Description Usage Arguments Value

View source: R/validate_bet.R

Description

Test Whether Action Is Valid

Usage

1
validate_bet(player, action, turn, bets, raise)

Arguments

player

An object of the S4 class player.

action

A string that represents the players action when it is their turn. It is usually generated using the input_action() funciton.

turn

An integer representing the index of the player who's go it is.

bets

A vector containing the current value of each player's contribution to the pot.

raise

A numeric value representing the most recent raise made by any of the players.

Value

A list containing a logical value representing the validity of the action. The list will have a second element when the logical value is FALSE, which contains a string detailing the nature of the problem.


dfcorbin/pokersim2 documentation built on Jan. 15, 2020, 12:20 a.m.