MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / score

Function score

examples/space_invaders/space_invaders.py:699–715  ·  view source on GitHub ↗

Process a glyph intersecting with a missile.

(session, window, state, glyph)

Source from the content-addressed store, hash-verified

697
698
699def score(session, window, state, glyph):
700 """Process a glyph intersecting with a missile."""
701
702 glyph.blank(window)
703 session.delete(glyph)
704 if state["saucer"] is glyph:
705 state["saucer"] = None
706 state["score"] += glyph.score
707 # render a splat !
708 GlyphCoordinate(
709 session,
710 "splat1",
711 glyph.x,
712 glyph.y,
713 tick=state["tick"],
714 label=str(glyph.score),
715 )
716
717
718def update_state(session, window, state):

Callers 1

move_missileFunction · 0.85

Calls 3

GlyphCoordinateClass · 0.85
blankMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected