Results¶
A Result represent the result of an investigation into one or more replays.
Result are yielded by the functions you would expect - that is,
steal_check() returns StealResult, relax_check() returns RelaxResult,
and correction_check() returns CorrectionResult.
Should you call cg.run(), Results corresponding to the Detect(s) you pass
will be yielded.
Steal Result (Example)¶
We will briefly cover StealResult as an example here. Look to the
documentation for the other Result classes for the attributes they provide.
The attributes available to us through StealResult are:
replay1andreplay2- the twoReplayobjects used in the comparison; in no meaningful ordersimilarity- roughly speaking, the average distance in pixels between the two replaysearlier_replayandlater_replay- a reference to eitherreplay1orreplay2respectively, depending on which one has an earliertimestamp.
And here is how we might use a StealResult:
cg = Circleguard("key")
r1 = ReplayMap(221777, 2757689)
r2 = ReplayMap(221777, 4196808)
for r in cg.steal_check([r1, r2]): # r is a StealResult
print(f"{r.replay1.username} +{r.replay1.mods} vs {r.replay2.username} "
f"+{r.replay2.mods} on {r.replay1.map_id}. {r.similarity} sim")