- // Ball is in the other half of the field\r
- | closerToGoal home ballPos zero = halt (x, mm)\r
- // Ball gained by us\r
- | we_have_ball\r
- // Ball not in penalty area\r
- | closerToGoal home ballPos {px=penalty_area_depth, py=zero} = halt (x, mm)\r
- // Ball in penalty area\r
+ | i_have_the_ball = kick kicktarget_keeper (x, mm)\r
+ | (dist me.pos ballPos) < (maxCatchReach me) = (CatchBall, mm)\r
+ | closerToHome home zero ballPos.pxy.px = halt (x, mm)\r
+ | ball_within_16\r
+ | ballIsFree football\r
+ | isClosest others me ballPos.pxy = halt (x, mm)\r
+ | otherwise = stayInGoal (x, mm)\r
+ | we_have_ball = stayInGoal (x, mm)\r