MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / intersects

Method intersects

examples/space_invaders/space_invaders.py:229–238  ·  view source on GitHub ↗

Return True if this GlyphCoordinate intersects with the given GlyphCoordinate.

(self, other)

Source from the content-addressed store, hash-verified

227
228 @hybrid_method
229 def intersects(self, other):
230 """Return True if this GlyphCoordinate intersects with
231 the given GlyphCoordinate."""
232
233 return ~(
234 (self.x + self.width < other.x) | (self.x > other.x + other.width)
235 ) & ~(
236 (self.y + self.height < other.y)
237 | (self.y > other.y + other.height)
238 )
239
240
241class EnemyGlyph(Glyph):

Callers 3

check_loseFunction · 0.45
render_messageFunction · 0.45
move_missileFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected