Exemplo n.º 1
0
 /// <summary>
 /// 确定这些牌都来自玩家的手牌或者装备中
 /// </summary>
 /// <param name="aCards">需要检查的牌</param>
 /// <returns>若都在手牌或者装备中,返回true</returns>
 public bool HasCardsInHandOrEquipage(Card[] aCards)
 {
     foreach (Card c in aCards)
     {
         if (c != null)
         {
             if (!Hands.Contains(c))
             {
                 if (c != Weapon)
                 {
                     if (c != Armor)
                     {
                         if (c != Jia1Ma)
                         {
                             if (c != Jian1Ma)
                             {
                                 return(false);
                             }
                         }
                     }
                 }
             }
         }
     }
     return(true);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 确定这些牌都在玩家的手牌中
 /// </summary>
 /// <param name="aCards">牌数组</param>
 /// <returns>若牌数组的牌都在手牌中,则返回true</returns>
 public bool HasCardsInHand(Card[] aCards)
 {
     foreach (Card c in aCards)
     {
         if (!Hands.Contains(c))
         {
             return(false);
         }
     }
     return(true);
 }