Exemplo n.º 1
0
def shouldBeSupporter(player):
    if not player.brain.motion.calibrated:
        player.claimedBall = False
        return False
        
    return (ballInBox(player) and
            claimTransitions.shouldCedeClaim(player))
Exemplo n.º 2
0
def shouldApproachBall(player):
    if ballNotInBox(player):
        player.claimedBall = False
        return False

    if claimTransitions.shouldCedeClaim(player):
        return False

    return True
Exemplo n.º 3
0
def shouldApproachBall(player):
    if ballNotInBox(player):
        player.claimedBall = False
        return False

    if claimTransitions.shouldCedeClaim(player):
        return False

    return True
Exemplo n.º 4
0
def shouldSupport(player):
    """
    when in positionAndKickBall don't care if the ball is in our box but do
    want to check who has higher priority claim
    """
    if not player.brain.motion.calibrated:
        player.claimedBall = False
        return False

    return player.brain.ball.vis.frames_on and claimTrans.shouldCedeClaim(player)
Exemplo n.º 5
0
def shouldSupport(player):
    """
    when in positionAndKickBall don't care if the ball is in our box but do
    want to check who has higher priority claim
    """
    if not player.brain.motion.calibrated:
        player.claimedBall = False
        return False
        
    return player.brain.ball.vis.frames_on and claimTrans.shouldCedeClaim(player)
Exemplo n.º 6
0
def shouldReturnHome(player):
    """
    The ball is no longer our responsibility. Go home.
    player.buffBoxFiltered is a CountTransition, see approachBall.

    If the ball IS in our box, check the claims for a higher priority claim
    """
    if player.buffBoxFiltered.checkCondition(player):
        player.claimedBall = False
        return True

    return claimTrans.shouldCedeClaim(player)
Exemplo n.º 7
0
def shouldReturnHome(player):
    """
    The ball is no longer our responsibility. Go home.
    player.buffBoxFiltered is a CountTransition, see approachBall.

    If the ball IS in our box, check the claims for a higher priority claim
    """
    if player.buffBoxFiltered.checkCondition(player):
        player.claimedBall = False
        return True

    return claimTrans.shouldCedeClaim(player)
Exemplo n.º 8
0
def shouldApproachBall(player):
    # print("In approachball")
    if ballNotInBox(player):
        # print("Returning false bc ball not in box")
        player.claimedBall = False
        return False

    if claimTransitions.shouldCedeClaim(player):
        print("Ceding claim")
        return False

    return True
def shouldApproachBall(player):
    # print("In approachball")
    if ballNotInBox(player):
        # print("Returning false bc ball not in box")
        player.claimedBall = False
        return False

    if claimTransitions.shouldCedeClaim(player):
        print("Ceding claim")
        return False

    return True
Exemplo n.º 10
0
def shouldBeSupporter(player):
    if not player.brain.motion.calibrated:
        player.claimedBall = False
        return False

    return (ballInBox(player) and claimTransitions.shouldCedeClaim(player))