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

Function _grid_lines

1-grid-world/env.py:30–34  ·  view source on GitHub ↗
(surf, unit, y_off=0)

Source from the content-addressed store, hash-verified

28
29
30def _grid_lines(surf, unit, y_off=0):
31 for c in range(WIDTH + 1):
32 pygame.draw.line(surf, GRID_LINE, (c * unit, y_off), (c * unit, y_off + HEIGHT * unit))
33 for r in range(HEIGHT + 1):
34 pygame.draw.line(surf, GRID_LINE, (0, y_off + r * unit), (WIDTH * unit, y_off + r * unit))
35
36
37def _center(x, y, unit, y_off=0):

Callers 3

renderMethod · 0.85
renderMethod · 0.85
_renderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected