def shouldBeSupporter(player): if not player.brain.motion.calibrated: player.claimedBall = False return False return (ballInBox(player) and claimTransitions.shouldCedeClaim(player))
def shouldApproachBall(player): if ballNotInBox(player): player.claimedBall = False return False if claimTransitions.shouldCedeClaim(player): return False return True
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)
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)
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