MCPcopy Create free account
hub / github.com/dds-bridge/dds / Pos

Class Pos

library/src/api/dds.h:97–111  ·  view source on GitHub ↗

* @brief Complete position state during game analysis. * * Represents the full state of a bridge position including card distribution, * trump information, and current play state. This is the core data structure * used throughout the solver. */

Source from the content-addressed store, hash-verified

95 * used throughout the solver.
96 */
97struct Pos
98{
99 unsigned short int rank_in_suit[DDS_HANDS][DDS_SUITS]; ///< Bitmask of ranks held by each hand in each suit
100 unsigned short int aggr[DDS_SUITS]; ///< Aggregate bitmask of all cards in each suit
101 unsigned char length[DDS_HANDS][DDS_SUITS]; ///< Number of cards each hand holds in each suit
102 int hand_dist[DDS_HANDS]; ///< Total number of cards held by each hand
103
104 unsigned short int win_ranks[50][DDS_SUITS]; ///< Cards that win by rank at each depth
105 int first[50]; ///< Hand that leads the trick for each ply
106 MoveType move[50]; ///< Presently winning move at each ply
107 int hand_rel_first; ///< Current hand, relative to first hand
108 int tricks_max; ///< Aggregated tricks won by maximizing side
109 HighCardType winner[DDS_SUITS]; ///< Winning rank of trick in each suit
110 HighCardType second_best[DDS_SUITS]; ///< Second best rank in each suit
111};
112
113/**
114 * @brief Trick-level data for current play state.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected