public void Update(Duel duel, Player player)
 {
     Hand.Update(duel, player.Hand);
     ManaZone.Update(duel, player.ManaZone);
     BattleZone.Update(duel, player.BattleZone);
     Deck.Update(duel, player.Deck);
     ShieldZone.Update(duel, player.ShieldZone);
     Graveyard.Update(duel, player.Graveyard);
 }
Beispiel #2
0
 public void PutFromTopOfDeckIntoShieldZone(int amount, Duel duel)
 {
     for (int i = 0; i < amount; ++i)
     {
         var card = RemoveTopCardOfDeck();
         _ = ShieldZone.Add(card, duel, null);
         var eve = new TopDeckCardPutIntoShieldZoneEvent(new Player(this), new Card(card, true));
         if (duel.Turns.Any())
         {
             duel.CurrentTurn.CurrentStep.GameEvents.Enqueue(eve);
         }
         else
         {
             duel.PreGameEvents.Enqueue(eve);
         }
     }
 }
Beispiel #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         BattleZone?.Dispose();
         BattleZone = null;
         Deck?.Dispose();
         Deck = null;
         Graveyard?.Dispose();
         Graveyard = null;
         Hand?.Dispose();
         Hand = null;
         ManaZone?.Dispose();
         ManaZone = null;
         ShieldZone?.Dispose();
         ShieldZone = null;
     }
 }