add_scores: add_scores

Description Usage Arguments See Also

View source: R/simulation_helpers.R

Description

Checks if all requested games have been played, if the games are single or multiplayer, and assigns the final gamecard to the global environment

Usage

1
2
add_scores(player_dice, num_dice, num_games, num_rolls, strategy,
  game_ticker, gamecard, scores_vector, final_score, multiplayer)

Arguments

player_dice

a vector of the dice saved to a player's hand in a given game

num_dice

the number of dice a player has left to roll

num_games

the number of games a user wishes to run within the simulation

num_rolls

the number of rolls a player has left to use

strategy

a character vector containing p1 and p2 strategies

game_ticker

the number of games already completed in the simulation

gamecard

a dataframe storing game number and score information

scores_vector

a vector of a player's scores

final_score

a numeric vector of a player's most recent final score

multiplayer

a logical vector determining whether games are single or multiplayer

See Also

Other helper functions: final_score_tab, greedy_reroll, initial_gameplay, rolling_function, strategy_function


jormacmoo/shipcapcrew documentation built on Dec. 26, 2019, 11:04 p.m.