maze-solver-go/maze/raw_maze.go
Karma Riuk 5445d28b2c Moved RaMaze to its own file, cuz we gonna need
some more functions and it would just clutter maze.go
2023-08-05 11:29:53 +02:00

29 lines
535 B
Go

package maze
import (
"fmt"
"strings"
)
type RawMaze struct {
PathChar, WallChar byte
Data []string
}
func (m *RawMaze) String() string {
var ret strings.Builder
ret.WriteString("{\n")
ret.WriteString(fmt.Sprintf("\tPathChar: %v,\n", m.PathChar))
ret.WriteString(fmt.Sprintf("\tWallChar: %v,\n", m.WallChar))
ret.WriteString("\tData: \n")
for _, line := range m.Data {
ret.WriteRune('\t')
ret.WriteRune('\t')
ret.WriteString(line)
ret.WriteRune('\n')
}
ret.WriteString("}")
return ret.String()
}