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

Function compare_TRACE

library/tests/compare.cpp:104–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102
103
104bool compare_TRACE(
105 const SolvedPlay& trace1,
106 const SolvedPlay& trace2)
107{
108 // In a buglet, Trace returned trace1 == -3 if there is
109 // no input at all (trace2 is then 0).
110 if (trace1.number != trace2.number && trace2.number > 0)
111 return false;
112
113 // Once that was fixed, the input file had length 0, not 1.
114 if (trace1.number == 1 && trace2.number == 0)
115 return true;
116
117 for (int i = 0; i < trace1.number; i++)
118 {
119 if (trace1.tricks[i] != trace2.tricks[i])
120 return false;
121 }
122
123 return true;
124}
125

Callers 1

loop_playFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected