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

Class ShotClassification

classifier.py:74–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
73@dataclass
74class ShotClassification:
75 label: str
76 cs_time: Optional[float] = None
77 shot_delay: Optional[float] = None
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 2

_build_classificationMethod · 0.90
classify_shotMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected