type Asteroids = S.Set Position
-type TargetInfo = (Float, Float)
+type TargetInfo = (Double, Double)
type Targets = M.Map TargetInfo Position
main :: IO ()
targetSequence :: Targets -> [Position]
targetSequence targets = targetNext ((- pi / 2) - 0.001) targets
-targetNext :: Float -> Targets -> [Position]
+targetNext :: Double -> Targets -> [Position]
targetNext angle targets
| M.null targets = []
| M.null possibles = targetNext (- pi) targets
targets' = M.delete (targetAngle, targetRange) targets
angle' = targetAngle
-possibleTargets :: Float -> Targets -> Targets
+possibleTargets :: Double -> Targets -> Targets
possibleTargets angle targets = M.filterWithKey (\(a, _) _ -> a > angle) targets
firstTarget :: Targets -> (TargetInfo, Position)