示例#1
0
        public void GetTotalManaCost()
        {
            var cost = new ManaCost();
            cost.Mana.Add(ManaColor.Black, 2);
            cost.Mana.Add(ManaColor.Green, 2);

            Assert.AreEqual(4, cost.GetTotalManaCost());
        }
示例#2
0
        public bool CanCastSpellWithCost(ManaCost cost)
        {
            if (cost.GetTotalManaCost() > GetTotalNrOfManaAvailable())
                return false;
            else if (!HasColoredManaAvailable(cost))
                return false;

            return true;
        }