maze-solver-go/maze/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

31 lines
393 B
Go

package maze
type Coordinates struct {
X, Y int
}
type Node struct {
Coords Coordinates
Up, Down *Node
Left, Right *Node
}
func NewNode(coords Coordinates) *Node {
return &Node{
Coords: coords,
Up: nil,
Down: nil,
Left: nil,
Right: nil,
}
}
type Maze struct {
Width, Height uint
Nodes []*Node
}
type SolvedMaze struct {
Maze
Solution []*Node
}