// Neighbors gathers the nearest undecided points
Neighbors gathers the nearest undecided points
// Neighbors gathers the nearest undecided points
func (maze *Maze) Neighbors(point *Point) (neighbors []int) {
	for _, direction := range Directions {
		next := point.Advance(direction)
		if maze.Contains(next) && maze.Directions[next.X][next.Y] == 0 {
			neighbors = append(neighbors, direction)
		}
	}
	return neighbors
}
func ( maze * Maze ) Neighbors ( point * Point ) ( neighbors [ ] int ) { for _ , direction := range Directions { next := point . Advance ( direction ) if maze . Contains ( next ) && maze . Directions [ next . X ] [ next . Y ] == 0 { neighbors = append ( neighbors , direction ) } } return neighbors }
Neighbors gathers the nearest undecided points
Neighbors gathers the nearest undecided points