(board-movement-meta board)examine all occupied positions of a board, and compile simple movement meta information
examine all occupied positions of a board, and compile simple movement meta information
(count-pieces board)(count-pieces board color-filter type-filter)count number of pieces on the board, with optional filtering by color and/or type
count number of pieces on the board, with optional filtering by color and/or type
initialize an empty board with no pieces
initialize an empty board with no pieces
(encode-slide-lookup-key-from-adjacencies position-adjacencies)transform a list of adjacency descriptors into a can-slide table lookup key
transform a list of adjacency descriptors into a can-slide table lookup key
(lookup-adjacent-climb-positions board position)return a list of positions onto which a piece at the given position could climb
return a list of positions onto which a piece at the given position could climb
(lookup-adjacent-positions board position)lookup neighboring positions as a directional map
lookup neighboring positions as a directional map
(lookup-adjacent-slide-positions board position)return a list of positions into which a piece at the given position could slide
return a list of positions into which a piece at the given position could slide
(lookup-occupied-adjacencies board position)return list of occupied adjacencies
return list of occupied adjacencies
(lookup-occupied-positions board)returns the occupied positions of board as a set
returns the occupied positions of board as a set
(lookup-piece board position)get the visible (top) piece at the stack specified by position
get the visible (top) piece at the stack specified by position
(lookup-piece-at-height board position idx)get the piece at position residing at height in the stack, or nil
get the piece at position residing at height in the stack, or nil
(lookup-piece-stack board position)return the stack of pieces at position
return the stack of pieces at position
(lookup-piece-stack-height board position)get the number of pieces at position
get the number of pieces at position
(lookup-slide-destinations board start-position)return a list of possible destinations that can be reached from a given starting position by only sliding
return a list of possible destinations that can be reached from a given starting position by only sliding
(move-piece board position-0 position-1)remove piece from board at position-0 and place it at position-1
remove piece from board at position-0 and place it at position-1
origin of the board addressing system — see doc/grid.png
origin of the board addressing system — see doc/grid.png
(place-piece board piece position)place a piece on the top of a stack at position
place a piece on the top of a stack at position
(purge-empties pieces)remove empty piece-stacks from board
remove empty piece-stacks from board
(remove-piece board position)remove the piece at the top of the stack at position
remove the piece at the top of the stack at position
(render-valid-positions-from-slide-lookup-val slide-lookup-val origin-position)transform a can-slide table lookup value into a filtered list of positions
transform a can-slide table lookup value into a filtered list of positions
(search-pieces {pieces :pieces} color-filter type-filter)search all pieces on the board, filtering by color and/or type
search all pieces on the board, filtering by color and/or type
(search-top-pieces board color-filter type-filter)search only the top pieces of each stack on the board, filtering by color and/or type
search only the top pieces of each stack on the board, filtering by color and/or type
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |