Liking cljdoc? Tell your friends :D

advent-utils.maze


adj-coordsclj

(adj-coords [x y] & {:keys [include-diagonals]})

Coordinates of adjacent points. If include-diagonals is not set or false, returns the four adjacent points, always in the order N W S E. Returns the eight adjacent coordinates if include-diagonals is set to true

Coordinates of adjacent points. If include-diagonals is not set or false, 
returns the four adjacent points, always in the order N W S E. Returns
the eight adjacent coordinates if include-diagonals is set to true
sourceraw docstring

all-openclj

(all-open open? maze)
source

cardinal-dirsclj

source

find-targetclj

(find-target maze target)
source

flood-fillclj

(flood-fill maze start)
source

follow-left-wallclj

(follow-left-wall neighbors)
source

grid-ofclj

(grid-of values)

Index a 2D list-of-list-of-values with coordinates starting at [0 0]

Index a 2D list-of-list-of-values with coordinates starting at [0 0]
sourceraw docstring

Mazeclj

source

Maze->Graphclj

(Maze->Graph maze)
source

maze-mapperclj

(maze-mapper maze position direction)
source

neighborsclj

(neighbors maze pos)

Map of the positions and values of the nearest (non-diagonal) neighbors to pos

Map of the positions and values of the nearest (non-diagonal) neighbors to pos
sourceraw docstring

next-directionclj

(next-direction direction turn)

The next cardinal (compass) direction corresponding to a relative direction (forward, left, backward, right)

The next cardinal (compass) direction corresponding to a relative direction
(forward, left, backward, right)
sourceraw docstring

one-stepclj

(one-step pos direction)

The position one step away from pos in the cardinal direction

The position one step away from pos in the cardinal direction
sourceraw docstring

relative-directionsclj

(relative-directions direction)

Returns a map between relative directions (forward, left, backward,right) and the cardinal (compass) directions for given cardinal direction

Returns a map between relative directions (forward, left, backward,right)
and the cardinal (compass) directions for given cardinal direction
sourceraw docstring

relative-dirsclj

source

relative-neighborsclj

(relative-neighbors maze pos direction)
source

spread-to-adjacentclj

(spread-to-adjacent maze [x y])
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close