Method
__init__
(self, agent, title, buttons=None)
Source from the content-addressed store, hash-verified
| 278 | BAR = 50 |
| 279 | |
| 280 | def __init__(self, agent, title, buttons=None): |
| 281 | self.agent = agent |
| 282 | self.env = PolicyEnv() |
| 283 | self.title = title |
| 284 | self.buttons = buttons or [] |
| 285 | self.agent_pos = [0, 0] |
| 286 | # Per-label click counts, available to button `enabled` predicates. |
| 287 | self.clicks = {} |
| 288 | # Brief "pressed" flash so clicks feel responsive. |
| 289 | self._press_label = None |
| 290 | self._press_frames = 0 |
| 291 | self._screen = None |
| 292 | self._values = None |
| 293 | self._arrows = None |
| 294 | |
| 295 | def click_count(self, label): |
| 296 | return self.clicks.get(label, 0) |
Callers
nothing calls this directly
Tested by
no test coverage detected