public virtual CardInGame PlayCard(Game game, int playerIndex, int cardToBePlayed)
        {
            if (game.IndexOfPlayerWhoPlayTheTurn != playerIndex)
            {
                throw new LogicExecutionException("Igrač nije na potezu");
            }
            PlayerInGame player = game.Players[playerIndex];

            if (!player.DoesPlayerOwnCard(cardToBePlayed, out PossibleCardPlace place) || place != PossibleCardPlace.HAND)
            {
                throw new LogicExecutionException("Data karta nije u igračevoj ruci");
            }
            if (!player.Cards.TryGetValue(PossibleCardPlace.FIELD, out LinkedList <CardInGame> field) || field.Count >= GameConfig.FIELD_SIZE)
            {
                throw new LogicExecutionException("Nema više mesta na terenu");
            }
            player.GetCard(cardToBePlayed, out CardInGame cardInGame);
            if (player.Mana < cardInGame.Cost)
            {
                throw new LogicExecutionException("Igrač nema dovoljno mane da bi igrao kartu");
            }
            player.Mana -= cardInGame.Cost;
            player.MoveCard(cardToBePlayed, PossibleCardPlace.FIELD);
            cardInGame.LastAttackingTurn = game.AccumulativeTurn;
            return(cardInGame);
        }
 private void Die(PlayerInGame owner, CardInGame card)
 {
     card.Health = card.Card.Health;
     card.Cost   = card.Card.Cost;
     card.Attack = card.Card.Attack;
     owner.MoveCard(card.InGameId, PossibleCardPlace.GRAVEYARD);
 }