GetOddsXdYHigherThan: Get the odds of rolling XdY dice and beating a given score.

Description Usage Arguments Value Examples

Description

Get the odds of rolling XdY dice and beating a given score.

Usage

1
2
GetOddsXdYHigherThan(X, score.odds, Y = 10, theoretical = FALSE,
  dice.rolls = 10000)

Arguments

X

An integer, the amount of dice to be rolled.

score.odds

An integer, the score to beat.

Y

An integer, the number of sides the die has. (Default: 10)

theoretical

Boolean, whether or not to use an ideal approach. Warning: An ideal approach can be very resource intensive for values of X and/or Y larger than 8. (Default: FALSE)

dice.rolls

An Integer, the amount of dice rolls to be simulated in case of running an empyrical simulation. (Default: 10000)

Value

An integer with the probability of the score given being achieved or beaten expressed as a percentage.

Examples

1
2
GetOddsXdYHigherThan(5, score.odds = 7)
GetOddsXdYHigherThan(X = 10, Y = 6, score.odds = 50)

rubenbanuelos/gameDesignTools documentation built on May 22, 2019, 4:42 p.m.