Beispiel #1
0
 /// <summary>
 /// Starting move, copies cards to tempcards
 /// </summary>
 /// <param name="card">Card which is clicked</param>
 /// <param name="fromdeck">int of deck where the cards are from</param>
 public void StartMove(int index, int fromdeck)
 {
     if (timerIsStarted == false)
     {
         RealTime.Start();
         BurningPoints.Start();
         timerIsStarted = true;
     }
     if (movedCards.IsEmpty() == true)
     {
         if (fromdeck == 0)
         {
             movedCards.SetCard(pakka.GetCard(fromdeck), 14);
             pakka.RemoveLastCard();
             fromdecknum = fromdeck;
         }
         else if (fromdeck == 1)
         {
             movedCards.SetCard(flipdeck.GetCard(fromdeck), 14);
             flipdeck.RemoveLastCard();
             fromdecknum = fromdeck;
         }
         else if (fromdeck == 2)
         {
             movedCards.SetCard(home1.GetCard(fromdeck), 14);
             home1.RemoveLastCard();
             fromdecknum = fromdeck;
             if (home1isFull == true)
             {
                 home1isFull = false;
             }
         }
         else if (fromdeck == 3)
         {
             movedCards.SetCard(home2.GetCard(fromdeck), 14);
             home2.RemoveLastCard();
             fromdecknum = fromdeck;
             if (home2isFull == true)
             {
                 home2isFull = false;
             }
         }
         else if (fromdeck == 4)
         {
             movedCards.SetCard(home3.GetCard(fromdeck), 14);
             home3.RemoveLastCard();
             fromdecknum = fromdeck;
             if (home3isFull == true)
             {
                 home3isFull = false;
             }
         }
         else if (fromdeck == 5)
         {
             movedCards.SetCard(home4.GetCard(fromdeck), 14);
             home4.RemoveLastCard();
             fromdecknum = fromdeck;
             if (home4isFull == true)
             {
                 home4isFull = false;
             }
         }
         // playfield decks
         else if (fromdeck == 6)
         {
             movedCards.SetDeck(plfld1.GetDeck(index, fromdeck), 14);
             fromdecknum = fromdeck;
         }
         else if (fromdeck == 7)
         {
             movedCards.SetDeck(plfld2.GetDeck(index, fromdeck), 14);
             fromdecknum = fromdeck;
         }
         else if (fromdeck == 8)
         {
             movedCards.SetDeck(plfld3.GetDeck(index, fromdeck), 14);
             fromdecknum = fromdeck;
         }
         else if (fromdeck == 9)
         {
             movedCards.SetDeck(plfld4.GetDeck(index, fromdeck), 14);
             fromdecknum = fromdeck;
         }
         else if (fromdeck == 10)
         {
             movedCards.SetDeck(plfld5.GetDeck(index, fromdeck), 14);
             fromdecknum = fromdeck;
         }
         else if (fromdeck == 11)
         {
             movedCards.SetDeck(plfld6.GetDeck(index, fromdeck), 14);
             fromdecknum = fromdeck;
         }
         else if (fromdeck == 12)
         {
             movedCards.SetDeck(plfld7.GetDeck(index, fromdeck), 14);
             fromdecknum = fromdeck;
         }
         else
         {
             fromdecknum = fromdeck;
             ReverseMove(index, fromdeck);
         }
         fromdecknum = fromdeck;
     }
     else
     {
         fromdecknum = fromdeck;
         ReverseMove(index, fromdeck);
     }
 }