Skip to contents

Validate hand based on game configuration, see day 2 - 2023

Usage

validate_hands(x, limits_df)

Arguments

x

Data frame with game details.

limits_df

Data frame with game configuration.

Value

Vector of TRUE and FALSE values linked to each hand

Examples

demo <- parse_game("Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green")
limits_df <- data.frame(
  colour = c("red", "green", "blue"),
  max_count = c(12, 13, 14)
)
validate_hands(demo, limits_df)
#> [1] TRUE TRUE TRUE