26 lines
489 B
Go
26 lines
489 B
Go
package main
|
|
|
|
import (
|
|
"maze-solver/io/reader"
|
|
"maze-solver/io/writer"
|
|
"maze-solver/solver"
|
|
"maze-solver/utils"
|
|
)
|
|
|
|
func main() {
|
|
input := "filename"
|
|
output := "filename"
|
|
|
|
reader := &reader.ImageReader{}
|
|
writer := &writer.ImageWriter{}
|
|
|
|
solver := &solver.Bfs{}
|
|
|
|
maze, err := reader.Read(input)
|
|
utils.Check(err, "Couldn't read maze from %q", input)
|
|
|
|
solved := solver.Solve(maze)
|
|
err = writer.Write(output, solved)
|
|
utils.Check(err, "Couldn't write solved maze to %q", output)
|
|
}
|