Пример #1
0
 private static void Swap(ref BoBai.Card card1, ref BoBai.Card card2)
 {
     BoBai.Card card;
     card  = card1;
     card1 = card2;
     card2 = card;
 }
Пример #2
0
 public BoBai.Card[] PlayerCards(int player)
 {
     if (player == 1)
     {
         BoBai.Card[] _cards = new BoBai.Card[13];
         for (int i = 0; i < 13; i++)
         {
             _cards[i] = bobai.cards[i];
         }
         return(_cards);
     }
     else if (player == 2)
     {
         BoBai.Card[] _cards = new BoBai.Card[13];
         for (int i = 13; i < 26; i++)
         {
             _cards[i - 13] = bobai.cards[i];
         }
         return(_cards);
     }
     else if (player == 3)
     {
         BoBai.Card[] _cards = new BoBai.Card[13];
         for (int i = 26; i < 39; i++)
         {
             _cards[i - 26] = bobai.cards[i];
         }
         return(_cards);
     }
     else
     {
         BoBai.Card[] _cards = new BoBai.Card[13];
         for (int i = 39; i < 52; i++)
         {
             _cards[i - 39] = bobai.cards[i];
         }
         return(_cards);
     }
 }