node:removeAllConnections only removes outgoing connections

Hello, I noticed an inconsistency between the documentation and the implementation of SDK version 0.10.1.

The documentation states that playdate.pathfinder.node:removeAllConnections() “Removes all connections to and from the calling node”. However, it only removes connections from the node.

Here’s a minimal example demonstrating the issue.

local grid = playdate.pathfinder.graph.new2DGrid(2, 1)
grid:nodeWithID(1):removeAllConnections()
print(grid:findPathWithIDs(1, 2), grid:findPathWithIDs(2, 1))

@dan pinging you, in case you didn’t see this. (I totally forget about the dev forum for days at a time… :frowning:)

Oh thanks, I did miss this! I’ll file a bug!

1 Like