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

Function parse_TRACE

library/tests/parse.cpp:478–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476
477
478bool parse_TRACE(
479 const vector<string>& list,
480 SolvedPlay * solvedp)
481{
482 if (list.size() < 2)
483 {
484 cout << "TRACE list does not have 2+ elements: " << list.size() << endl;
485 return false;
486 }
487
488 if (! get_head_element(list[0], "TRACE"))
489 return false;
490
491 if (! get_int_element(list[1], solvedp->number, "TRACE number"))
492 return false;
493
494 for (unsigned i = 0; i < static_cast<unsigned>(solvedp->number); i++)
495 if (! get_int_element(list[2+i], solvedp->tricks[i], "TRACE element"))
496 return false;
497
498 return true;
499}
500
501
502bool parseable_GIB(const string& line)

Callers 1

read_fileFunction · 0.85

Calls 2

get_head_elementFunction · 0.85
get_int_elementFunction · 0.85

Tested by

no test coverage detected