Expand description
§contract-bridge
Data types and primitives for the game of contract bridge.
This crate provides the shared “lingo” — cards, hands, deals, seats, bids,
contracts, scoring, auctions, hand evaluation, and random deal generation —
used by higher-level bridge crates such as dds-bridge (a double-dummy
solver wrapper) and pons (analysis and simulation).
§Features
serde— deriveSerialize/Deserializeon all public types that support it.rand— enable thedeckmodule for random card shuffling and deal generation.
Re-exports§
pub use contract::Bid;pub use contract::Contract;pub use contract::Level;pub use contract::Penalty;pub use deal::Builder;pub use deal::FullDeal;pub use deal::PartialDeal;pub use hand::Card;pub use hand::Hand;pub use hand::Holding;pub use hand::Rank;pub use seat::Seat;pub use seat::SeatFlags;
Modules§
- auction
- Auction lingo: calls, legal-call enforcement, and the sequence of calls that make up the bidding phase of a deal.
- contract
- Bidding, penalties, and scoring in contract bridge.
- deal
- Four-hand deal containers.
- eval
- Hand evaluation: HCP, shortness, Fifths, BUM-RAP, losing trick count, NLTC, and Zar points.
- hand
- Card primitives: ranks, cards, holdings, and hands.
- seat
- Table positions and bitsets over them.
Structs§
- Parse
Strain Error - Error returned when parsing a
Strainfails - Parse
Suit Error - Error returned when parsing a
Suitfails - Suit
From Notrump Error - Error raised when converting
Strain::Notrumpto a suit