Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

IT'S ROCKET SCIENCE !

def ship_hits_rect(ship, tl, br):
    return ship[0] <= br[0] and ship[0] >= tl[0] and ship[1] <= br[1] and ship[1] >= tl[1]