Exemplo n.º 1
0
 public void ReturnToHand(CardViewModel target, string gameId)
 {
     using (var context = new MagicDbContext())
     {
         var player = context.Players.Find(target.CasterId, gameId);
         //player.Deck.
     }
 }
Exemplo n.º 2
0
 public bool RestoreCardFromGraveyard(CardViewModel card, List<CardViewModel> targetCollection, bool copy = false)
 {
     if (Graveyard.Any(c => c.Id == card.Id))
     {
         targetCollection.Add(card);
         if (!copy)
         {
             Graveyard.Remove(card);
         }
         return true;
     }
     return false;
 }
Exemplo n.º 3
0
 public bool PlayCard(CardViewModel card)
 {
     if (Hand.Any(c => c.Id == card.Id))
     {
         Hand.Remove(card);
         card.Play();
         return true;
     }
     return false;
 }
Exemplo n.º 4
0
 public bool PutCardToGraveyard(CardViewModel card, List<CardViewModel> targetCollection)
 {
     if (targetCollection.Exists(c => c.Id == card.Id))
     {
         targetCollection.Remove(card);
         Graveyard.Add(card);
         return true;
     }
     return false;
 }
Exemplo n.º 5
0
 public bool ExileCard(CardViewModel card, List<CardViewModel> targetCollection)
 {
     if (targetCollection.Exists(c => c.Id == card.Id))
     {
         Exiled.Add(card);
         targetCollection.Remove(card);
         return true;
     }
     return false;
 }