func New(rows, columns int) *GridWorld {
	grid := make([][]*GridNode, rows)
	world := GridWorld{grid: grid}

	for i := range grid {
		grid[i] = make([]*GridNode, columns)
	}

	for row := 0; row < rows; row++ {
		for column := 0; column < columns; column++ {
			grid[row][column] = &GridNode{X: row, Y: column, Cost: 1, world: &world}
		}
	}
	return &world
}
// New creates a 2D grid of nodes
New creates a 2D grid of nodes
// New creates a 2D grid of nodes
func New(rows, columns int) *GridWorld {
	grid := make([][]*GridNode, rows)
	world := GridWorld{grid: grid}
	for i := range grid {
		grid[i] = make([]*GridNode, columns)
	}
	for row := 0; row < rows; row++ {
		for column := 0; column < columns; column++ {
			grid[row][column] = &GridNode{X: row, Y: column, Cost: 1, world: &world}
		}
	}
	return &world
}
func New ( rows , columns int ) * GridWorld { grid := make ( [ ] [ ] * GridNode , rows ) world := GridWorld { grid : grid } for i := range grid { grid [ i ] = make ( [ ] * GridNode , columns ) } for row := 0 ; row < rows ; row ++ { for column := 0 ; column < columns ; column ++ { grid [ row ] [ column ] = & GridNode { X : row , Y : column , Cost : 1 , world : & world } } } return & world }
New creates a 2D grid of nodes
New creates a 2D grid of nodes