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

Method IsValidDistribution

library/tests/trans_table/mock_data_generators.cpp:86–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86bool MockHandGenerator::IsValidDistribution(const int hand_dist[DDS_HANDS]) const {
87 int total = 0;
88 for (int hand = 0; hand < DDS_HANDS; hand++) {
89 if (hand_dist[hand] < 0 || hand_dist[hand] > 13) {
90 return false;
91 }
92 total += hand_dist[hand];
93 }
94 return total <= 52;
95}
96
97void MockHandGenerator::PrintDistribution(const int hand_dist[DDS_HANDS]) const {
98 std::cout << "Hand distribution: [";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected