diff --git a/README.md b/README.md index 2bb9fad..72cc548 100644 --- a/README.md +++ b/README.md @@ -38,24 +38,24 @@ After downloading `maze-solver` from the [assets of the latest release](releases/latest "Latest release"), you can use it with the following arguments -| Short | Long | Default | Description | -| ----- | ----------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| -h | --help | | Print help information | -| -v | --verbose | 0 | Verbose level of the solver | -| -i | --input | `maze.png` | Input file | -| -o | --output | `sol.png` | Output file | -| | --path-char-in | `' '` | Character to represent the path in an input text file. | -| | --wall-char-in | `'#'` | Character to represent the wall in an input text file. | -| | --path-char-out | `' '` | Character to represent the path in an output text file. | -| | --wall-char-out | `'#'` | Character to represent the wall in an output text file. | -| | --cell-size-in | 3 | Size of a cell (in pixels) for input file of image type. | -| | --cell-size-out | 3 | Size of a cell (in pixels) for output file of image type. | -| -a | --algo | a-star | Algorithm to solve the maze, available options: dfs, bfs, dijkstra, a-star. | -| | --visualize | | Visualizer the progress of the solver, available options: video, window.
Window will give a live feed of the solver, whereas video creates a video --output with mp4 extension. | -| | --video-name | `sol.mp4` | Name of the output file if --visualize is set to 'video'. | -| | --video-framerate | 60 | Framerate of the video if --visualize is set to 'video'. | +| Short | Long | Default | Description | +| ----- | ----------------- | ---------- | ------------------------------------------------------------------------------------------------ | +| -h | --help | | Print help information | +| -v | --verbose | 0 | Verbose level of the solver see [verbose levels](#verbose-levels) | +| -i | --input | `maze.png` | Input file | +| -o | --output | `sol.png` | Output file | +| | --path-char-in | `' '` | Character to represent the path in an input text file. | +| | --wall-char-in | `'#'` | Character to represent the wall in an input text file. | +| | --path-char-out | `' '` | Character to represent the path in an output text file. | +| | --wall-char-out | `'#'` | Character to represent the wall in an output text file. | +| | --cell-size-in | 3 | Size of a cell (in pixels) for input file of image type. | +| | --cell-size-out | 3 | Size of a cell (in pixels) for output file of image type. | +| -a | --algo | a-star | Algorithm to solve the maze
Available options: | +| | --visualize | | Visualizer the progress of the solver see [visualization methods](#visulazation-methods) | +| | --video-name | `sol.mp4` | Name of the output file if --visualize is set to 'video'. | +| | --video-framerate | 60 | Framerate of the video if --visualize is set to 'video'. | -For the verbose level of the solver +### Verbose levels | Level | Description | | ----- | ------------------------------------------------------------------------- | @@ -64,4 +64,11 @@ For the verbose level of the solver | 2 | prints the time the solving algorithm took to run | | 3 | prints the time taken by each section (reader, solving algorithm, writer) | +### Visualization methods + +| option | description | +| ------ | ---------------------------------------------------------------------- | +| window | will give a live feed of the solver | +| video | creates a video where each frame is a step the solving algorithm takes | + diff --git a/main.go b/main.go index b28c59a..b3e3843 100644 --- a/main.go +++ b/main.go @@ -179,7 +179,7 @@ func parse_arguments() (*reader.ReaderFactory, *writer.WriterFactory, *solver.So }) visFactory.Type = argparser.Selector("", "visualize", visualizer.VIZ_METHODS, &argparse.Options{ - Help: fmt.Sprintf("Visualizer the progress of the solver, available options: %s. Window will give a live feed of the solver, whereas video creates a video --output with mp4 extension", strings.Join(visualizer.VIZ_METHODS, ", ")), + Help: fmt.Sprintf("Visualizer the progress of the solver, available options: %s. Window will give a live feed of the solver, whereas video creates a video creates a video where each frame is a step the solving algorithm takes", strings.Join(visualizer.VIZ_METHODS, ", ")), Default: "", })