mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-05-19 03:23:27 +02:00
linting
This commit is contained in:
@@ -112,9 +112,7 @@ func MakeDijkstraGrid(grid [][]string, startCoords [2]int) *DijkstraGrid {
|
|||||||
// distance = 0
|
// distance = 0
|
||||||
finalGrid[startCoords[0]][startCoords[1]].distance = 0
|
finalGrid[startCoords[0]][startCoords[1]].distance = 0
|
||||||
finalGrid[startCoords[0]][startCoords[1]].seen = true
|
finalGrid[startCoords[0]][startCoords[1]].seen = true
|
||||||
queue := [][2]int{
|
queue := [][2]int{{startCoords[0], startCoords[1]}}
|
||||||
[2]int{startCoords[0], startCoords[1]},
|
|
||||||
}
|
|
||||||
return &DijkstraGrid{finalGrid, queue}
|
return &DijkstraGrid{finalGrid, queue}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,10 +165,7 @@ func (dijk *DijkstraGrid) handleFrontOfQueue() (queueIsEmpty bool) {
|
|||||||
dijk.queue = dijk.queue[1:]
|
dijk.queue = dijk.queue[1:]
|
||||||
|
|
||||||
// if queue is empty, there are no more paths to generate, return a true
|
// if queue is empty, there are no more paths to generate, return a true
|
||||||
if len(dijk.queue) == 0 {
|
return len(dijk.queue) == 0
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************************************
|
/********************************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user