public static int Throws(Dice dice, int nThrows = 1, CountingMethod countingMethod = null, ThrowModifier mod = ThrowModifier.Normal) { return Throws(dice.NumFaces, dice.NumDice, nThrows, countingMethod, mod); }
public static int Throws(Dice dice, int nThrows = 1, CountingMethod countingMethod = null, ThrowModifier mod = ThrowModifier.Normal) { return(Throws(dice.NumFaces, dice.NumDice, nThrows, countingMethod, mod)); }
public static int Throws(int nFaces, int nDice = 1, int nThrows = 1, CountingMethod countingMethod = null, ThrowModifier mod = ThrowModifier.Normal) { switch(mod) { case ThrowModifier.Minimized: return nDice * nThrows; case ThrowModifier.Maximized: return nFaces * nDice * nThrows; case ThrowModifier.Averaged: return (int)Math.Floor((((nDice * nThrows) * (1 + nFaces)) / 2.0) * nThrows); case ThrowModifier.Normal: default: return Throws(nFaces, nDice, nThrows, countingMethod); } }
public static int Throws(int nFaces, int nDice = 1, int nThrows = 1, CountingMethod countingMethod = null, ThrowModifier mod = ThrowModifier.Normal) { switch (mod) { case ThrowModifier.Minimized: return(nDice * nThrows); case ThrowModifier.Maximized: return(nFaces * nDice * nThrows); case ThrowModifier.Averaged: return((int)Math.Floor((((nDice * nThrows) * (1 + nFaces)) / 2.0) * nThrows)); case ThrowModifier.Normal: default: return(Throws(nFaces, nDice, nThrows, countingMethod)); } }