(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
(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]
(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
(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)
(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
(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
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close