Description Usage Arguments Details Value Examples
A function that finds the shortest path between points in a maze.
1 | solve_maze(maze, start = "bottomleft", end = "topright")
|
maze |
A |
start |
The coordinates of the starting point, or a description of a
relative location (see |
end |
The coordinates of the end point, or a description of a relative
location (see |
For the start
and end
arguments (as well as the output
matrix), these coordinates refer to the plotting coordinates, not the
matrix indices. For plotting, the x-coordinate (column index) is listed
first, whereas in matrix notation, the row (y-coordinate) is listed first.
A matrix
containing the coordinates of the path through the
maze. Note that the x-coordinate (column index) comes first, so for the
corresponding indices in the original matrix, these coordinates will need
to be reversed.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.