Process a glyph intersecting with a missile.
(session, window, state, glyph)
| 697 | |
| 698 | |
| 699 | def 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 | |
| 718 | def update_state(session, window, state): |
no test coverage detected