Alert when pathfinding was incomplete

main
Bryson Zimmerman 11 months ago
parent 983bbdb51b
commit 8b16993de3

@ -52,7 +52,7 @@ object BFSPathfinder {
while(current != start) {
World.update(current, current.getProperties() + Directions.BFSINPATH)
current.getConnections().forEach { candidateTile ->
val candidateG = gVals.get(candidateTile) ?: -1
val candidateG = gVals.get(candidateTile) ?: (-1).also { println("Missing gVal at ${candidateTile.toString()}")}
if(candidateTile.isInBounds() && candidateG != -1 && candidateG < lowestG ) {
lowestG = candidateG
lowestCost = candidateTile

Loading…
Cancel
Save