Forgot to put the width and height of the maze
when I parsed it, oops (and now it's tested)
This commit is contained in:
@ -8,13 +8,18 @@ import (
|
||||
|
||||
func Parse(reader reader.Reader) (*maze.Maze, error) {
|
||||
nodesByCoord := make(map[maze.Coordinates]*maze.Node)
|
||||
ret := &maze.Maze{}
|
||||
|
||||
raw_maze, err := reader.Read()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ret := &maze.Maze{
|
||||
Width: raw_maze.Width,
|
||||
Height: raw_maze.Height,
|
||||
Nodes: []*maze.Node{},
|
||||
}
|
||||
|
||||
y := 0
|
||||
// Parse first line to get entrance
|
||||
for x := 0; x < raw_maze.Width-1; x++ {
|
||||
|
Reference in New Issue
Block a user