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

Function main

examples/calc_dd_table.cpp:21–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20
21auto main() -> int
22{
23 DdTableDeal tableDeal;
24 DdTableResults table;
25
26 int res;
27 char line[80];
28 bool match;
29
30#if defined(__linux) || defined(__APPLE__)
31 SetMaxThreads(0);
32#endif
33
34 for (int handno = 0; handno < 3; handno++)
35 {
36
37 for (int h = 0; h < DDS_HANDS; h++)
38 for (int s = 0; s < DDS_SUITS; s++)
39 tableDeal.cards[h][s] = holdings_[handno][s][h];
40
41 res = CalcDDtable(tableDeal, &table);
42
43 if (res != RETURN_NO_FAULT)
44 {
45 ErrorMessage(res, line);
46 printf("DDS error: %s\n", line);
47 }
48
49 match = compare_table(&table, handno);
50
51 sprintf(line,
52 "CalcDDtable, hand %d: %s\n",
53 handno + 1, (match ? "OK" : "ERROR"));
54
55 print_hand(line, tableDeal.cards);
56
57 print_table(&table);
58 }
59}

Callers

nothing calls this directly

Calls 6

SetMaxThreadsFunction · 0.85
CalcDDtableFunction · 0.85
ErrorMessageFunction · 0.85
compare_tableFunction · 0.85
print_handFunction · 0.85
print_tableFunction · 0.85

Tested by

no test coverage detected