print.maze: Print Maze

View source: R/maze.R

print.mazeR Documentation

Print Maze

Description

Display a maze object.

Usage

## S3 method for class 'maze'
print(x, ..., walls = FALSE, start = NULL, end = NULL, compress = "v")

Arguments

x

A maze object.

...

Further arguments passed to print.bm_bitmap, if the bittermelon package is available.

walls

logical value, indicating that the walls of the maze should be plotted, rather than the paths through the maze. Default is FALSE.

start, end

The coordinates of the starting and ending points of a path through the maze, or descriptions of relative locations (eg. "topleft", see find_maze_refpoint). If not provided, no path will be drawn.

compress

How to compress the bitmap representation, see print.bm_bitmap. For maze objects, the default is "v" for vertical.

Details

If the bittermelon package is available, print.maze prints a representation of the maze az a bitmap object. Otherwise, it prints the matrix representation.

Examples

m <- maze(10,10)
print(m)


kstreet13/mazing documentation built on May 12, 2024, 10:32 a.m.