/// <summary> /// Creates a <see cref="Octgn.Play.Card"/> from a <see cref="Octgn.DataNew.Entities.ICard"/> and stores its <see cref="Octgn.Play.CardIdentity"/> /// </summary> /// <param name="card"></param> /// <param name="player"></param> /// <returns></returns> public static Play.Card ToPlayCard(this ICard card, Play.Player player) { ulong key = card.GenerateKey(); int id = card.GenerateCardId(); var retCard = new Play.Card(player, id, key, Program.GameEngine.Definition.GetCardById(card.Id), true); return(retCard); }