MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / update_splat

Function update_splat

examples/space_invaders/space_invaders.py:685–696  ·  view source on GitHub ↗

Render splat animations.

(session, window, state)

Source from the content-addressed store, hash-verified

683
684
685def update_splat(session, window, state):
686 """Render splat animations."""
687
688 for splat in session.query(GlyphCoordinate).join(
689 GlyphCoordinate.glyph.of_type(SplatGlyph)
690 ):
691 age = state["tick"] - splat.tick
692 if age > 10:
693 splat.blank(window)
694 session.delete(splat)
695 else:
696 splat.render(window, state)
697
698
699def score(session, window, state, glyph):

Callers 1

update_stateFunction · 0.85

Calls 6

blankMethod · 0.80
renderMethod · 0.80
joinMethod · 0.45
queryMethod · 0.45
of_typeMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected