Beispiel #1
0
        public void ShouldGetExpectedSmashCharge(SmashChargeModifier chargeModifier, int expected)
        {
            var data = new SmashChargeProblemData
            {
                Damage = 40,
                HeldFrames = 50,
                SmashChargeModifier = chargeModifier
            };

            var result = _calculator.SmashCharge(data);
            Assert.That(result, Is.EqualTo(expected));
        }
Beispiel #2
0
 /// <summary>
 /// Returns the calculated Smash charge frames.
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public int SmashCharge(SmashChargeProblemData data)
 {
     return (int)Math.Round(data.Damage * (data.HeldFrames / data.SmashChargeModifier.GetModifierValue()));
 }