Exemplo n.º 1
0
 public decimal CalculateProbability(Die die, IRollTarget target, IRollModifier modifier)
 {
     return(die.CalculateProbability(1) * die.CalculateProbability(target.GetModifiedSuccessfulSides(die.TotalSides, modifier).Count()));
 }
Exemplo n.º 2
0
 public IEnumerable <int> GetRerollSides(Die die, IRollTarget target)
 {
     return(new[] { 1 });
 }
Exemplo n.º 3
0
        public decimal CalculateProbability(Die die, IRollTarget target, IRollModifier modifier)
        {
            var failures = die.TotalSides - target.GetSuccessfulSides(die.TotalSides).Count();

            return(die.CalculateProbability(failures) * die.CalculateProbability(target.GetModifiedSuccessfulSides(die.TotalSides, modifier).Count()));
        }
Exemplo n.º 4
0
 public IEnumerable <int> GetRerollSides(Die die, IRollTarget target)
 {
     return(die.GetSides().Except(target.GetSuccessfulSides(die.TotalSides)));
 }
Exemplo n.º 5
0
 public decimal CalculateProbability(Die die, IRollTarget target, IRollModifier modifier)
 {
     return(0);
 }