public BidType AskForBid(Contract currentContract, IList<BidType> allowedBids, IList<BidType> previousBids)
        {
            if (this.AlwaysPass)
            {
                return BidType.Pass;
            }

            allowedBids.Remove(BidType.Double);
            allowedBids.Remove(BidType.ReDouble);
            return allowedBids.RandomElement();
        }
Exemplo n.º 2
0
 public BidType AskForBid(Contract currentContract, IList<BidType> allowedBids, IList<BidType> previousBids)
 {
     int max = 0;
     BidType currentBid = BidType.Pass;
     foreach (var item in announceStrength)
     {
         if (item.Value > max && allowedBids.Contains(item.Key) && item.Value > 14)
         {
             max = item.Value;
             currentBid = item.Key;
         }
         if (item.Value >= 24 && allowedBids.Contains(BidType.Double))
         {
             currentBid = BidType.Double;
             break;
         }
         if (item.Value >= 24 && allowedBids.Contains(BidType.ReDouble))
         {
             currentBid = BidType.ReDouble;
             break;
         }
     }
     return currentBid;
 }
Exemplo n.º 3
0
 public Trick(Contract contract, PlayerPosition firstPlayer)
 {
     this.Contract = contract;
     this.FirstPlayer = firstPlayer;
 }
Exemplo n.º 4
0
 public BidEventArgs(PlayerPosition position, BidType bid, Contract currentContract)
 {
     this.Position        = position;
     this.Bid             = bid;
     this.CurrentContract = currentContract;
 }