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

Method IsValidHandDistribution

library/tests/trans_table/test_utilities.cpp:272–284  ·  view source on GitHub ↗

TestDataValidator implementation

Source from the content-addressed store, hash-verified

270
271// TestDataValidator implementation
272bool TestDataValidator::IsValidHandDistribution(const int hand_dist[DDS_HANDS])
273{
274 int total = 0;
275 for (int hand = 0; hand < DDS_HANDS; hand++) {
276 if (hand_dist[hand] < 0 || hand_dist[hand] > 13) {
277 return false;
278 }
279 total += hand_dist[hand];
280 }
281
282 // Total should be reasonable for remaining cards
283 return total >= 0 && total <= 52;
284}
285
286bool TestDataValidator::IsValidAggrTarget(const unsigned short aggrTarget[DDS_SUITS])
287{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected