MCPcopy Create free account
hub / github.com/rlcode/reinforcement-learning / _triangle

Function _triangle

1-grid-world/env.py:53–56  ·  view source on GitHub ↗
(surf, x, y, unit, color, y_off=0)

Source from the content-addressed store, hash-verified

51
52
53def _triangle(surf, x, y, unit, color, y_off=0):
54 cx, cy = _center(x, y, unit, y_off)
55 r = int(unit * 0.36)
56 pygame.draw.polygon(surf, color, [(cx, cy - r), (cx - r, cy + r), (cx + r, cy + r)])
57
58
59# ---------------------------------------------------------------------------

Callers 3

renderMethod · 0.85
renderMethod · 0.85
_renderMethod · 0.85

Calls 1

_centerFunction · 0.85

Tested by

no test coverage detected