Safe Haskell | Safe |
---|
Synopsis
- genRandoms :: Int -> Int -> [Int]
- numRandom :: Int -> Int
- subList :: Int -> [a] -> [[a]]
- convertPiece :: Int -> Piece
- printCorridor :: Corridor -> String
- printMaze' :: Maze -> String
- convertCorridor :: [Int] -> Corridor
- convertMaze :: [[Int]] -> Maze
- changeCorridor :: Corridor -> Corridor
- changeMaze :: Maze -> Maze
- makeWalls :: Maze -> Maze
- middleHeight :: Maze -> Int
- middleCorridors :: Maze -> [Corridor]
- breakWall :: [Corridor] -> [Corridor]
- openTunnel :: Maze -> Maze
- ghostHouseEven :: Maze
- ghostHouseOdd :: Maze
- auxCorridor :: Corridor -> Corridor -> Corridor
- auxMaze :: Maze -> Maze -> Maze
- insertGhostHouse :: Maze -> Maze -> Maze
- samplehouse :: Maze -> Maze
- generateMaze :: Int -> Int -> Int -> Maze
Documentation
genRandoms :: Int -> Int -> [Int] #
Given a seed returns a list of n integer randomly generated
convertPiece :: Int -> Piece #
Converts an integer number into a Piece
printCorridor :: Corridor -> String #
Converts a Corridor to a string
printMaze' :: Maze -> String #
Converts a Maze to a string
convertCorridor :: [Int] -> Corridor #
Converts a list of integers into a Corridor
convertMaze :: [[Int]] -> Maze #
Converts a list of lists of integers into a Maze
changeCorridor :: Corridor -> Corridor #
Changes the first and last element of a corridor to a Wall piece
changeMaze :: Maze -> Maze #
Changes the first and last element of every Corridor in a inputed Maze to a Wall piece.
middleHeight :: Maze -> Int #
Divides the the height of maze by 2 that returns the middle height of the maze.
middleCorridors :: Maze -> [Corridor] #
Function that defines length of the middle corridors for even and odd cases.
breakWall :: [Corridor] -> [Corridor] #
Changes the first and last Wall of a [Corridor] to an Empty piece.
openTunnel :: Maze -> Maze #
Converts a Maze to a Maze with space for the tunnel.
ghostHouseEven :: Maze #
Sample for the ghost's house even and odd.
ghostHouseOdd :: Maze #
auxCorridor :: Corridor -> Corridor -> Corridor #
Replaces the middle pieces in a corridor given by the second input by the middle pieces of the first input.
auxMaze :: Maze -> Maze -> Maze #
Replaces the middle pieces in all corridores of the second inputed maze.
insertGhostHouse :: Maze -> Maze -> Maze #
insertGhostHouse takes as first input a ghost house and as second a Maze and then places the ghost house in the middle of the maze.
samplehouse :: Maze -> Maze #
Depending on the length (even or odd) of a corridor inserts the ghost house (even or odd).
generateMaze :: Int -> Int -> Int -> Maze #
Generates a random Maze with x columns and y lines.