private static string GetCall(Bid bid) { if (bid.Pass) { return("Pass"); } if (bid.ReDouble) { return("XX"); } if (bid.Double) { return("X"); } return(bid.Level.ToString() + PBNSuitMapper.GetstringFromSuit(bid.Suit)); }
public static string GetstringFromContract(Contract contract) { if (contract.Level == 0) { return("Pass"); } var ret = new StringBuilder(); ret.Append(contract.Level); ret.Append(PBNSuitMapper.GetstringFromSuit(contract.Suit)); if (contract.ReDoubled) { ret.Append("XX"); } else if (contract.Doubled) { ret.Append("X"); } return(ret.ToString()); }