Beispiel #1
0
 /// <summary>
 /// Use this method to bury cards in a Jack-of-Diamonds game.
 /// </summary>
 public void BuryCards(IHand hand, IHumanPlayer picker, List <SheepCard> cardsToBury, bool goItAlone)
 {
     if (hand.Picker != picker)
     {
         throw new NotPlayersTurnException("A non-picker cannot bury cards.");
     }
     cardsToBury.ForEach(c => picker.RemoveCard(c));
     cardsToBury.ForEach(c => hand.AddBuried(c));
     if (goItAlone)
     {
         hand.GoItAlone();
     }
 }
Beispiel #2
0
 public static void BuryCards(IHand hand, IPlayer picker, List <SheepCard> burried)
 {
     if (picker != null)
     {
         hand.Blinds.ToList().ForEach(c => {
             if (!picker.Cards.Contains(c))
             {
                 picker.AddCard(c);
             }
         });
         burried.ForEach(c => {
             if (picker.Cards.Contains(c))
             {
                 picker.RemoveCard(c);
             }
         });
         burried.ForEach(c => hand.AddBuried(c));
     }
 }