Return the number of army glyphs remaining - the player wins if this is zero.
(session, state)
| 472 | |
| 473 | |
| 474 | def check_win(session, state): |
| 475 | """Return the number of army glyphs remaining - |
| 476 | the player wins if this is zero.""" |
| 477 | |
| 478 | return ( |
| 479 | session.query(func.count(GlyphCoordinate.id)) |
| 480 | .join(GlyphCoordinate.glyph.of_type(ArmyGlyph)) |
| 481 | .scalar() |
| 482 | ) |
| 483 | |
| 484 | |
| 485 | def check_lose(session, state): |