Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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);
 }