MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / draw

Function draw

examples/space_invaders/space_invaders.py:460–471  ·  view source on GitHub ↗

Load all current GlyphCoordinate objects from the database and render.

(session, window, state)

Source from the content-addressed store, hash-verified

458
459
460def draw(session, window, state):
461 """Load all current GlyphCoordinate objects from the
462 database and render.
463
464 """
465 for gcoord in session.query(GlyphCoordinate).options(
466 joinedload(GlyphCoordinate.glyph)
467 ):
468 gcoord.render(window, state)
469 window.addstr(1, WINDOW_WIDTH - 5, "Score: %.4d" % state["score"])
470 window.move(0, 0)
471 window.refresh()
472
473
474def check_win(session, state):

Callers 2

startFunction · 0.85
mainFunction · 0.85

Calls 5

joinedloadFunction · 0.90
renderMethod · 0.80
optionsMethod · 0.45
queryMethod · 0.45
refreshMethod · 0.45

Tested by

no test coverage detected