public static Octgn.Play.CardIdentity CreateIdentity(this Play.Card card) { Play.CardIdentity ret = null; if (card.IsVisibleToAll()) { ret = card.Type; ret.Visible = true; } else { ret = new Play.CardIdentity(GenerateCardId()); //ret.Alias = ret.MySecret = true; ret.Key = ((ulong)Crypto.PositiveRandom()) << 32 | (uint)card.Type.Id; ret.Visible = false; } return ret; }
public static Octgn.Play.CardIdentity CreateIdentity(this Play.Card card) { Play.CardIdentity ret = null; if (card.IsVisibleToAll()) { ret = card.Type; ret.Visible = true; } else { ret = new Play.CardIdentity(GenerateCardId()); //ret.Alias = ret.MySecret = true; ret.Key = ((ulong)Crypto.PositiveRandom()) << 32 | (uint)card.Type.Id; ret.Visible = false; } return(ret); }