data Maze = Maze Coord (Coord -> Tile)
mazes :: List Maze
mazes =
Entry (Maze (C 1 1) maze9) $
Entry (Maze (C 0 0) maze8) $
Entry (Maze (C (-3) 3) maze7) $
Entry (Maze (C (-2) 4) maze6) $
Entry (Maze (C 0 1) maze5) $
Entry (Maze (C 1 (-3)) maze4) $
Entry (Maze (C (-4) 3) maze3) $
Entry (Maze (C 0 1) maze1) $
Empty
extraMazes :: List Maze
extraMazes =
Entry (Maze (C 1 (-3)) maze4') $
Entry (Maze (C 1 (-3)) maze4'') $
Entry (Maze (C 1 1) maze9') $
mazes
maze1 :: Coord -> Tile
maze1 (C x y)
| abs x > 4 || abs y > 4 = Blank
| abs x == 4 || abs y == 4 = Wall
| x == 2 && y <= 0 = Wall
| x == 3 && y <= 0 = Storage
| x >= -2 && y == 0 = Box
| otherwise = Ground
maze3 :: Coord -> Tile
maze3 (C (-5) (-5)) = Wall
maze3 (C (-5) (-4)) = Wall
maze3 (C (-5) (-3)) = Wall
maze3 (C (-5) (-2)) = Wall
maze3 (C (-5) (-1)) = Wall
maze3 (C (-5) 0 ) = Wall
maze3 (C (-5) 1 ) = Wall
maze3 (C (-5) 2 ) = Wall
maze3 (C (-5) 3 ) = Wall
maze3 (C (-5) 4 ) = Wall
maze3 (C (-4) (-5)) = Wall
maze3 (C (-4) (-4)) = Ground
maze3 (C (-4) (-3)) = Ground
maze3 (C (-4) (-2)) = Ground
maze3 (C (-4) (-1)) = Ground
maze3 (C (-4) 0 ) = Ground
maze3 (C (-4) 1 ) = Ground
maze3 (C (-4) 2 ) = Ground
maze3 (C (-4) 3 ) = Ground
maze3 (C (-4) 4 ) = Wall
maze3 (C (-3) (-5)) = Wall
maze3 (C (-3) (-4)) = Ground
maze3 (C (-3) (-3)) = Wall
maze3 (C (-3) (-2)) = Wall
maze3 (C (-3) (-1)) = Wall
maze3 (C (-3) 0 ) = Wall
maze3 (C (-3) 1 ) = Ground
maze3 (C (-3) 2 ) = Wall
maze3 (C (-3) 3 ) = Ground
maze3 (C (-3) 4 ) = Wall
maze3 (C (-3) 5 ) = Wall
maze3 (C (-2) (-5)) = Wall
maze3 (C (-2) (-4)) = Box
maze3 (C (-2) (-3)) = Ground
maze3 (C (-2) (-2)) = Ground
maze3 (C (-2) (-1)) = Ground
maze3 (C (-2) 0 ) = Wall
maze3 (C (-2) 1 ) = Ground
maze3 (C (-2) 2 ) = Box
maze3 (C (-2) 3 ) = Box
maze3 (C (-2) 4 ) = Ground
maze3 (C (-2) 5 ) = Wall
maze3 (C (-1) (-6)) = Wall
maze3 (C (-1) (-5)) = Wall
maze3 (C (-1) (-4)) = Ground
maze3 (C (-1) (-3)) = Ground
maze3 (C (-1) (-2)) = Ground
maze3 (C (-1) (-1)) = Ground
maze3 (C (-1) 0 ) = Wall
maze3 (C (-1) 1 ) = Ground
maze3 (C (-1) 2 ) = Ground
maze3 (C (-1) 3 ) = Box
maze3 (C (-1) 4 ) = Ground
maze3 (C (-1) 5 ) = Wall
maze3 (C (-1) 6 ) = Wall
maze3 (C 0 (-6)) = Wall
maze3 (C 0 (-5)) = Ground
maze3 (C 0 (-4)) = Ground
maze3 (C 0 (-3)) = Ground
maze3 (C 0 (-2)) = Ground
maze3 (C 0 (-1)) = Ground
maze3 (C 0 0 ) = Wall
maze3 (C 0 1 ) = Wall
maze3 (C 0 2 ) = Wall
maze3 (C 0 3 ) = Wall
maze3 (C 0 4 ) = Ground
maze3 (C 0 5 ) = Ground
maze3 (C 0 6 ) = Wall
maze3 (C 1 (-6)) = Wall
maze3 (C 1 (-5)) = Ground
maze3 (C 1 (-4)) = Ground
maze3 (C 1 (-3)) = Ground
maze3 (C 1 (-2)) = Ground
maze3 (C 1 (-1)) = Ground
maze3 (C 1 0 ) = Wall
maze3 (C 1 1 ) = Storage
maze3 (C 1 2 ) = Storage
maze3 (C 1 3 ) = Storage
maze3 (C 1 4 ) = Ground
maze3 (C 1 5 ) = Ground
maze3 (C 1 6 ) = Wall
maze3 (C 2 (-6)) = Wall
maze3 (C 2 (-5)) = Wall
maze3 (C 2 (-4)) = Ground
maze3 (C 2 (-3)) = Ground
maze3 (C 2 (-2)) = Ground
maze3 (C 2 (-1)) = Ground
maze3 (C 2 0 ) = Wall
maze3 (C 2 1 ) = Wall
maze3 (C 2 2 ) = Wall
maze3 (C 2 3 ) = Wall
maze3 (C 2 4 ) = Wall
maze3 (C 2 5 ) = Wall
maze3 (C 2 6 ) = Wall
maze3 (C 3 (-5)) = Wall
maze3 (C 3 (-4)) = Ground
maze3 (C 3 (-3)) = Ground
maze3 (C 3 (-2)) = Storage
maze3 (C 3 (-1)) = Ground
maze3 (C 3 0 ) = Wall
maze3 (C 4 (-5)) = Wall
maze3 (C 4 (-4)) = Wall
maze3 (C 4 (-3)) = Wall
maze3 (C 4 (-2)) = Wall
maze3 (C 4 (-1)) = Wall
maze3 (C 4 0 ) = Wall
maze3 _ = Blank
maze4 :: Coord -> Tile
maze4 (C x y)
| abs x > 4 || abs y > 4 = Blank
| abs x == 4 || abs y == 4 = Wall
| x == 2 && y < 0 = Wall
| x >= -1 && y == 1 && x <= 2 = Wall
| x == -3 && y == 1 = Wall
| x == 0 && y == 3 = Wall
| x == 0 && y == 0 = Wall
| x == 3 && y == -3 = Storage
| x == 1 && y == 2 = Storage
| x == -3 && y == 2 = Storage
| x == 1 && y == -1 = Storage
| x == -2 && y == 1 = Box
| x == 2 && y == 2 = Box
| x <= 1 && y == -2 && x >= 0 = Box
| otherwise = Ground
maze5 :: Coord -> Tile
maze5 (C x y)
| abs x > 4 || abs y > 4 = Blank
| abs x == 4 || abs y == 4 = Wall
| x == 1 && y < 0 = Wall
| x == -3 && y == -2 = Wall
| x <= 1 && x > -2 && y == 0 = Wall
| x > -3 && x < 3 && y == 2 = Wall
| x == 3 && y > 1 = Storage
| y == -2 && x < 0 = Box
| y == -2 && x == 2 = Box
| y == 0 && x == 3 = Box
| y == -1 && x > 1 && x < 4 = Storage
| otherwise = Ground
maze6 :: Coord -> Tile
maze6 (C x y)
| abs x > 3 || abs y > 5 = Blank
| abs x == 3 || (abs y == 5 && abs x < 4) = Wall
| x == 0 && abs y < 4 = Storage
| x == -1 && (y == 0 || abs y == 2) = Box
| x == 1 && (abs y == 1 || abs y == 3) = Box
| x == (-2) && y == 1 = Wall
| otherwise = Ground
maze7 :: Coord -> Tile
maze7 (C x y)
| abs x > 4 || abs y > 4 = Blank
| abs x == 4 || abs y == 4 = Wall
| not (x == 2) && y == 2 = Wall
| not (x == -2) && y == -1 = Wall
| x == 3 && y == -3 = Storage
| x == 2 && y == 2 = Box
| otherwise = Ground
maze8 :: Coord -> Tile
maze8 (C x y)
| abs x > 10 || abs y > 10 = Blank
| x == 0 && y == 0 = Ground
| abs x == 9 && abs y == 9 = Wall
| abs x == 10 || abs y == 10 = Wall
| x == y = Storage
| abs x == abs y = Box
| x < 0 && x > (-9) && y == 0 = Box
| x > 0 && x < 9 && y == 0 = Storage
| otherwise = Ground
maze9 :: Coord -> Tile
maze9 (C x y)
| abs x > 4 || abs y > 4 = Blank
| abs x == 4 || abs y == 4 || x == -3 = Wall
| x == -2 && (y == 3 || y == 0) = Wall
| x == -1 && y == -1 = Wall
| x == -0 && y == 1 = Wall
| x == 3 && y == 0 = Wall
| x < 0 && (y == 2 || y == -3) = Storage
| x == -1 && y == 1 = Storage
| x == 0 && (y == 2 || y == 0 || y == -1) = Box
| x == 1 && y == -2 = Box
| x == 2 && y == -3 = Box
| otherwise = Ground
maze4'' :: Coord -> Tile
maze4'' (C 1 (-3)) = Box
maze4'' c = maze4 c
maze4' :: Coord -> Tile
maze4' (C 0 1) = Blank
maze4' c = maze4 c
maze9' :: Coord -> Tile
maze9' (C 3 0) = Box
maze9' (C 4 0) = Box
maze9' c = maze9 c