예제 #1
0
        public static Duelist Restore(string id, int health, int mana, int manaSlots, Deck deck, IList <Card> hand)
        {
            var completeManaSlots = new List <ManaSlot>()
                                    .Concat(Enumerable.Repeat(ManaSlot.Filled(), mana))
                                    .Concat(Enumerable.Repeat(ManaSlot.Empty(), manaSlots - mana))
                                    .ToList();

            return(new Duelist(id, health, completeManaSlots, deck, hand.ToList()));
        }
예제 #2
0
 internal void RefillMana()
 {
     manaSlots = manaSlots.Map(_ => ManaSlot.Filled()).ToList();
 }