Example #1
0
 public void RotateCard(Region Region, int CardNo, int Option)
 {
     if (Option == 0)
     {
         Region.CardList[CardNo].IsHorizontal = true;
     }
     else if (Option == 1)
     {
         Region.CardList[CardNo].IsHorizontal = false;
     }
     else
     {
         Region.CardList[CardNo].IsHorizontal = !Region.CardList[CardNo].IsHorizontal;
     }
 }
Example #2
0
 public void MoveCard(Card card, Region toWhere, int NumberDes)
 {
     if (toWhere.Equals(this.Deck) || toWhere.Equals(this.Orb))
     {
         card.FrontShown = false;
         card.Visible = false;
     }
     else
     {
         if (!((toWhere.Equals(this.Kizuna) || toWhere.Equals(this.KizunaUsed)) && (card.BelongedRegion().Equals(this.Kizuna) || card.BelongedRegion().Equals(this.KizunaUsed))))
         {
             card.FrontShown = true;
             card.Visible = true;
         }
     }
     Region fromWhere = card.BelongedRegion();
     fromWhere.CardList.Remove(card);
     toWhere.CardList.Insert(NumberDes, card);
 }
Example #3
0
 public void ReverseCard(Region Region, int CardNo, int Option)
 {
     if (Option == 0)
     {
         Region.CardList[CardNo].FrontShown = false;
     }
     else if (Option == 1)
     {
         Region.CardList[CardNo].FrontShown = true;
     }
     else
     {
         Region.CardList[CardNo].FrontShown = !Region.CardList[CardNo].FrontShown;
     }
 }
Example #4
0
 public void MoveCard(Region fromWhere, int Number, Region toWhere, int NumberDes )
 {
     if (toWhere.Equals(this.Deck) || toWhere.Equals(this.Orb))
     {
         fromWhere.CardList[Number].FrontShown = false;
         fromWhere.CardList[Number].Visible = false;
     }
     else
     {
         if (!((toWhere.Equals(this.Kizuna) || toWhere.Equals(this.KizunaUsed)) && (fromWhere.Equals(this.Kizuna) || fromWhere.Equals(this.KizunaUsed))))
         {
             fromWhere.CardList[Number].FrontShown = true;
             fromWhere.CardList[Number].Visible = true;
         }
     }
     toWhere.CardList.Insert(NumberDes, fromWhere.CardList[Number]);
     fromWhere.CardList.RemoveAt(Number);
 }
Example #5
0
 public User(string UserAsString)
 {
     List<string> temp = new List<string>();
     temp.AddRange(UserAsString.Replace("#", "").Replace("#", "").Split(new string[] { "},{" }, StringSplitOptions.None));
     Deck = new Region(temp[0], this);
     Hand = new Region(temp[1], this);
     Grave = new Region(temp[2], this);
     Support = new Region(temp[3], this);
     Kizuna = new Region(temp[4], this);
     KizunaUsed = new Region(temp[5], this);
     Orb = new Region(temp[6], this);
     FrontField = new Region(temp[7], this);
     BackField = new Region(temp[8], this);
     Overlay = new Region(temp[9], this);
     AllRegions = new List<Region>();
     AllRegions.Add(Deck);
     AllRegions.Add(Hand);
     AllRegions.Add(Grave);
     AllRegions.Add(Support);
     AllRegions.Add(Kizuna);
     AllRegions.Add(KizunaUsed);
     AllRegions.Add(Orb);
     AllRegions.Add(FrontField);
     AllRegions.Add(BackField);
     AllRegions.Add(Overlay);
 }
Example #6
0
 public User()
 {
     Deck = new Region(this);
     Hand = new Region(this);
     Grave = new Region(this);
     Support = new Region(this);
     Kizuna = new Region(this);
     KizunaUsed = new Region(this);
     Orb = new Region(this);
     FrontField = new Region(this);
     BackField = new Region(this);
     Overlay = new Region(this);
     AllRegions = new List<Region>();
     AllRegions.Add(Deck);
     AllRegions.Add(Hand);
     AllRegions.Add(Grave);
     AllRegions.Add(Support);
     AllRegions.Add(Kizuna);
     AllRegions.Add(KizunaUsed);
     AllRegions.Add(Orb);
     AllRegions.Add(FrontField);
     AllRegions.Add(BackField);
     AllRegions.Add(Overlay);
 }
Example #7
0
 public void MoveCard(Card card, Region toWhere, int NumberDes)
 {
     Region fromWhere = card.BelongedRegion();
     if (fromWhere.Equals(Overlay))
     {
         List<Card> temp = new List<Card>();
         temp.AddRange(FrontField.CardList);
         temp.AddRange(BackField.CardList);
         foreach (Card parentCard in temp)
         {
             if (parentCard.OverlayCardNo.Contains(card.NumberInDeck))
             {
                 parentCard.OverlayCardNo.Remove(card.NumberInDeck);
                 break;
             }
         }
     }
     if (toWhere.Equals(Deck) || toWhere.Equals(Orb))
     {
         card.FrontShown = false;
         card.Visible = false;
     }
     else
     {
         if (!((toWhere.Equals(Kizuna) || toWhere.Equals(KizunaUsed)) && (card.BelongedRegion().Equals(Kizuna) || card.BelongedRegion().Equals(KizunaUsed))))
         {
             card.FrontShown = true;
             card.Visible = true;
         }
     }
     if (!((toWhere.Equals(FrontField) || toWhere.Equals(BackField)) && (card.BelongedRegion().Equals(FrontField) || card.BelongedRegion().Equals(BackField))))
     {
         card.SolCounter = 0;
         card.LunaCounter = 0;
     }
     fromWhere.CardList.Remove(card);
     toWhere.CardList.Insert(NumberDes, card);
 }
Example #8
0
 public void MoveCard(Region fromWhere, int Number, Region toWhere, int NumberDes)
 {
     if (fromWhere.Equals(Overlay))
     {
         List<Card> temp = new List<Card>();
         temp.AddRange(FrontField.CardList);
         temp.AddRange(BackField.CardList);
         foreach (Card card in temp)
         {
             if (card.OverlayCardNo.Contains(fromWhere.CardList[Number].NumberInDeck))
             {
                 card.OverlayCardNo.Remove(fromWhere.CardList[Number].NumberInDeck);
                 break;
             }
         }
     }
     if (toWhere.Equals(Deck) || toWhere.Equals(Orb))
     {
         fromWhere.CardList[Number].FrontShown = false;
         fromWhere.CardList[Number].Visible = false;
     }
     else
     {
         if (!((toWhere.Equals(Kizuna) || toWhere.Equals(KizunaUsed)) && (fromWhere.Equals(Kizuna) || fromWhere.Equals(KizunaUsed))))
         {
             fromWhere.CardList[Number].FrontShown = true;
             fromWhere.CardList[Number].Visible = true;
         }
     }
     if (!((toWhere.Equals(FrontField) || toWhere.Equals(BackField)) && (fromWhere.Equals(FrontField) || fromWhere.Equals(BackField))))
     {
         fromWhere.CardList[Number].SolCounter = 0;
         fromWhere.CardList[Number].LunaCounter = 0;
     }
     toWhere.CardList.Insert(NumberDes, fromWhere.CardList[Number]);
     fromWhere.CardList.RemoveAt(Number);
 }