MCPcopy Create free account
hub / github.com/cs2kitchen/cStrafe-UI-minimal / to_display_string

Method to_display_string

classifier.py:80–98  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

78 overlap_time: Optional[float] = None
79
80 def to_display_string(self) -> str:
81 lines = [f"Classification: {self.label}"]
82 if (
83 self.label == "Counter‑strafe"
84 and self.cs_time is not None
85 and self.shot_delay is not None
86 ):
87 lines.append(f"CS time: {self.cs_time:.0f} ms")
88 lines.append(f"Shot delay: {self.shot_delay:.0f} ms")
89 elif self.label == "Overlap" and self.overlap_time is not None:
90 lines.append(f"Overlap: {self.overlap_time:.0f} ms")
91 elif (
92 self.label == "Bad"
93 and self.cs_time is not None
94 and self.shot_delay is not None
95 ):
96 lines.append(f"CS time: {self.cs_time:.0f} ms")
97 lines.append(f"Shot delay: {self.shot_delay:.0f} ms")
98 return "\n".join(lines)
99
100
101class MovementClassifier:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected