def hitTest( a, b ):
    """Circular collision test. Assumes x, y, and radius members on both objects."""
    r = a.radius + b.radius
    x = abs( a.x - b.x )
    y = abs( a.y - b.y )
    if x <= r and y <= r and x*x + y*y <= r*r:
        return 1
    return 0