Safe HaskellSafe

Tarefa1

Synopsis

Documentation

genRandoms :: Int -> Int -> [Int] #

Given a seed returns a list of n integer randomly generated

numRandom :: Int -> Int #

Given a seed returns an integer randomly generated

subList :: Int -> [a] -> [[a]] #

Converts list into a list of list of size n

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.

makeWalls :: Maze -> Maze #

Converts a given maze to a maze surrounded by Wall pieces.

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.

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.