fix: some typos :)

This commit is contained in:
Karma Riuk 2023-08-27 13:13:02 +02:00
parent 86d3496bca
commit d1b50ba372
2 changed files with 23 additions and 23 deletions

View File

@ -39,19 +39,19 @@ After downloading `maze-solver` from the
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. Default: maze.png |
| -o | --output | `maze_sol.png` | Input file. Default: maze_sol.png |
| | --path-char-in | `' '` | Character to represent the path in a input text file. |
| | --wall-char-in | `'#'` | Character to represent the wall in a input text file. |
| | --path-char-out | `' '` | Character to represent the path in a output text file. |
| | --wall-char-out | `'#'` | Character to represent the wall in a output text file. |
| -i | --input | `maze.png` | Input file |
| -o | --output | `maze_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, avaiable options: dfs, bfs, dijkstra, a-star. |
| | --visualize | | Visualizer the progress of the solver, avaiable options: video, window. Window will give a live feed of the solver, whereas video creates a video --output with mp4 extension. |
| -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.<br> Window will give a live feed of the solver, whereas video creates a video --output with mp4 extension. |
| | --video-name | `'maze_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'. |

14
main.go
View File

@ -105,7 +105,7 @@ func parse_arguments() (*reader.ReaderFactory, *writer.WriterFactory, *solver.So
writerFactory.Type = writer.TYPES[".png"]
writerFactory.Filename = argparser.String("o", "output", &argparse.Options{
Help: "Input file",
Help: "Output file",
Default: "maze_sol.png",
Validate: func(args []string) error {
var ok bool
@ -120,7 +120,7 @@ func parse_arguments() (*reader.ReaderFactory, *writer.WriterFactory, *solver.So
})
readerFactory.PathChar = argparser.String("", "path-char-in", &argparse.Options{
Help: "Character to represent the path in a input text file",
Help: "Character to represent the path in an input text file",
Default: " ",
Validate: func(args []string) error {
if len(args[0]) > 1 {
@ -131,7 +131,7 @@ func parse_arguments() (*reader.ReaderFactory, *writer.WriterFactory, *solver.So
})
readerFactory.WallChar = argparser.String("", "wall-char-in", &argparse.Options{
Help: "Character to represent the wall in a input text file",
Help: "Character to represent the wall in an input text file",
Default: "#",
Validate: func(args []string) error {
if len(args[0]) > 1 {
@ -142,7 +142,7 @@ func parse_arguments() (*reader.ReaderFactory, *writer.WriterFactory, *solver.So
})
writerFactory.PathChar = argparser.String("", "path-char-out", &argparse.Options{
Help: "Character to represent the path in a output text file",
Help: "Character to represent the path in an output text file",
Default: " ",
Validate: func(args []string) error {
if len(args[0]) > 1 {
@ -153,7 +153,7 @@ func parse_arguments() (*reader.ReaderFactory, *writer.WriterFactory, *solver.So
})
writerFactory.WallChar = argparser.String("", "wall-char-out", &argparse.Options{
Help: "Character to represent the wall in a output text file",
Help: "Character to represent the wall in an output text file",
Default: "#",
Validate: func(args []string) error {
if len(args[0]) > 1 {
@ -174,12 +174,12 @@ func parse_arguments() (*reader.ReaderFactory, *writer.WriterFactory, *solver.So
})
solverFactory.Type = argparser.Selector("a", "algo", solver.TYPES, &argparse.Options{
Help: fmt.Sprintf("Algorithm to solve the maze, avaiable options: %s", strings.Join(solver.TYPES, ", ")),
Help: fmt.Sprintf("Algorithm to solve the maze, available options: %s", strings.Join(solver.TYPES, ", ")),
Default: solver.TYPES[0],
})
visFactory.Type = argparser.Selector("", "visualize", visualizer.VIZ_METHODS, &argparse.Options{
Help: fmt.Sprintf("Visualizer the progress of the solver, avaiable 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 --output with mp4 extension", strings.Join(visualizer.VIZ_METHODS, ", ")),
Default: "",
})