Beispiel #1
0
 public override IEnumerable<Card> GetCardsToPass(PlayerView toPlayer)
 {
     // try to pass off our high spades
     var highSpades = Hand
         .OfSuit(Suit.Spades)
         .Outranking(new Card(Suit.Spades, Rank.Jack))
         .OrderByDescending(c => c.Rank)
         .Take(3); // this will take three *if possible*
     var others = Hand
         .Except(highSpades)
         .Shuffle();
     return highSpades
         .Concat(others)
         .Take(3);
 }
Beispiel #2
0
 public override void NotifyPassedCards(IEnumerable<Card> cards, PlayerView fromPlayer)
 {
 }
 public override IEnumerable<Card> GetCardsToPass(PlayerView toPlayer)
 {
     return this
         .Hand
         .Choose(3);
 }
Beispiel #4
0
 internal PlayView(Play play, PlayerBase beholder)
 {
     Card = play.Card;
     Player = new PlayerView(play.Player, beholder);
 }