Start to implement equipment sites on body
This commit is contained in:
@@ -112,15 +112,15 @@ mvSonicWave w pt
|
||||
dosplit :: [Maybe ((Point2,Float),(Bool,Bool))] -> [[(Point2,Float)]]
|
||||
dosplit (x:xs) = case x of
|
||||
Nothing -> [] : dosplit xs
|
||||
Just (pair,(True,True)) -> onHead (pair:) $ dosplit xs
|
||||
Just (pair,(False,True)) -> [] : onHead (pair:) (dosplit xs)
|
||||
Just (pair,(True,True)) -> overHead (pair:) $ dosplit xs
|
||||
Just (pair,(False,True)) -> [] : overHead (pair:) (dosplit xs)
|
||||
Just (pair,(True,False)) -> [pair] : dosplit xs
|
||||
Just (_,(False,False)) -> [] : dosplit xs
|
||||
dosplit [] = [[]]
|
||||
|
||||
onHead :: (a -> a) -> [a] -> [a]
|
||||
onHead f (x:xs) = f x: xs
|
||||
onHead _ [] = []
|
||||
overHead :: (a -> a) -> [a] -> [a]
|
||||
overHead f (x:xs) = f x: xs
|
||||
overHead _ [] = []
|
||||
|
||||
|
||||
reflectShockLine :: Wall -> Point2 -> Point2 -> Point2 -> Maybe ((Point2,Float),(Bool,Bool))
|
||||
|
||||
Reference in New Issue
Block a user