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

Function parse_TABLE

library/tests/parse.cpp:348–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346
347
348bool parse_TABLE(
349 const vector<string>& list,
350 DdTableResults * table)
351{
352 if (list.size() != 21)
353 {
354 cout << "Table list does not have 21 elements: " << list.size() << endl;
355 return false;
356 }
357
358 if (! get_head_element(list[0], "TABLE"))
359 return false;
360
361 for (unsigned suit = 0; suit < DDS_STRAINS; suit++)
362 {
363 for (unsigned pl = 0; pl < DDS_HANDS; pl++)
364 {
365 if (! get_int_element(list[DDS_HANDS * suit + pl + 1],
366 table->res_table[suit][pl], "TABLE entry"))
367 return false;
368 }
369 }
370
371 return true;
372}
373
374
375bool parse_PAR(

Callers 1

read_fileFunction · 0.85

Calls 2

get_head_elementFunction · 0.85
get_int_elementFunction · 0.85

Tested by

no test coverage detected