コード例 #1
0
 public SimpleCard(Card target)
 {
     gameId = "";
     if (target != null)
     {
         bitmap = target.bitmap;
         fileName = target.fileName;
     }
 }
コード例 #2
0
 public Card(Card other): base(other.fileName)
 {
     bitmap = other.bitmap;
     name = other.name;
     set = other.set;
     color = other.color;
     manacost = other.manacost;
     type = other.type;
     pt = other.pt;
     tablerow = other.tablerow;
     text = other.text;
 }
コード例 #3
0
        public static List<Card> CardSpliting(string serverReturn)
        {
            List<Card> ret = new List<Card>();



            foreach (String elem in Regex.Split(serverReturn, "idCard\r").Where(w => w != "").ToArray())
            {
                if (!elem.Contains("idDeck"))
                {
                    String tmp = "idCard\r" + elem;

                    for (int i = 0; i < Convert.ToInt32(VMProfile.getval(tmp, "nbCard")); i++)
                    {
                        Card tmpcard = new Card(VMBuilding.db.ElementAt(Convert.ToInt32(VMProfile.getval(tmp, "idCard"))));
                        tmpcard.location = Location.Deck;
                        ret.Add(tmpcard);
                    }
                }
            }
            return ret;
        }