+mind field (x=:{referee,football,others,me}, mm=:{home})\r
+# others = (me team others)\r
+| isClosest others me (getBall x).ballPos.pxy = (afterfix (kick nextPos) (getBall x).ballPos.pxy (maxKickReach me)) (x, mm)\r
+| otherwise = halt (x, mm)\r
+ where\r
+ nextPos = let np = nextPlayer home others me.pos in if (isNothing np) (centerOfGoal (other home) field) (fromJust np)\r
+\r
+nextPlayer :: !Home [Footballer] Position -> Maybe Position\r
+nextPlayer home xs pos\r
+# xs = filter (\x.closerToGoal home x.pos.px pos.px) xs\r
+| xs == [] = Nothing\r
+| otherwise = Just (minListBy (\x y.(dist x.pos pos) < (dist y.pos pos)) xs).pos\r
+\r
+closest :: [Footballer] Position -> Footballer\r
+closest xs p = minListBy (\x y.(dist x.pos p) < (dist y.pos p)) xs\r
+\r
+isClosest :: [Footballer] Footballer Position -> Bool\r
+isClosest xs x p = closest [x:xs] p == x\r