Indent
This commit is contained in:
@@ -34,7 +34,7 @@ getExpansionArray i expOffset expInc (h: t)
|
||||
getExpansionArrays :: Int -> Image -> (ExpansionArray, ExpansionArray)
|
||||
getExpansionArrays expInc image = let expX = getExpansionArray 1 0 expInc $ sortUniq . map fst $ image
|
||||
expY = getExpansionArray 1 0 expInc $ sortUniq . map snd $ image
|
||||
in (listArray (1, length expX) expX, listArray (1, length expY) expY)
|
||||
in (listArray (1, length expX) expX, listArray (1, length expY) expY)
|
||||
|
||||
getDistancesGalaxy :: Image -> (ExpansionArray, ExpansionArray) -> (Int, Int) -> [Int]
|
||||
getDistancesGalaxy [] _ _ = []
|
||||
|
||||
@@ -44,7 +44,7 @@ isLineReflected (y1, x1) (y2, x2) p
|
||||
isVerticalReflection :: (Int, Int) -> Pattern -> Bool
|
||||
isVerticalReflection (y, x) p
|
||||
| y <= fst (snd $ bounds p) = isLineReflected (y, x) (y, x + 1) p && isVerticalReflection (y + 1, x) p
|
||||
| otherwise = True
|
||||
| otherwise = True
|
||||
|
||||
isColReflected :: (Int, Int) -> (Int, Int) -> Pattern -> Bool
|
||||
isColReflected (y1, x1) (y2, x2) p
|
||||
@@ -54,7 +54,7 @@ isColReflected (y1, x1) (y2, x2) p
|
||||
isHorizontalReflection :: (Int, Int) -> Pattern -> Bool
|
||||
isHorizontalReflection (y, x) p
|
||||
| x <= snd (snd $ bounds p) = isColReflected (y, x) (y + 1, x) p && isHorizontalReflection (y, x + 1) p
|
||||
| otherwise = True
|
||||
| otherwise = True
|
||||
|
||||
getVerticalReflection :: Int -> Int -> Pattern -> Int
|
||||
getVerticalReflection x ignore p | x >= snd (snd $ bounds p) = 0
|
||||
|
||||
Reference in New Issue
Block a user