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(); }
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; }
public Trick(Contract contract, PlayerPosition firstPlayer) { this.Contract = contract; this.FirstPlayer = firstPlayer; }
public BidEventArgs(PlayerPosition position, BidType bid, Contract currentContract) { this.Position = position; this.Bid = bid; this.CurrentContract = currentContract; }