[][src]Module world_map_gen::draw

Helper to draw a generated map to terminal screen or as JSON.

Terminal must support 256colors. And large map may require much time and CPU usage to render map.

Functions

draw_json

Render the given board as JSON to given writer. When deserializing the board as JSON or writing the result to the writer failed, it returns an error.

draw_term

Render the given board to terminal screen. When the show_altitude flag is set to true, it renders the altitude value for each cell instead of each cell's characters. This flag is usually enabled for debugging purpose. When writing to terminal fails, it returns an error.