More Pathfinding
I'll tell you what: my first try at implementing the pathfinding algorithm was a disaster. I had the general idea right, but creating(malloc-ing) and deleting(free-ing) all of the necessary nodes to find the path was not code you want to write in a hurry. I ended up debugging errors with (probably) freeing memory I'd already freed, and eventually realized that maybe I didn't need to do all that work on the heap (and subsequently clear all that out to get ready for the next guy who needed to find the quickest path by which to deliver a swing at the player's head).
That was the second thing I realized, though. The first was that my unit tests (which I'm pretty dependent on in my day job) could use some work.
Unit testing in C, at least as far as I've been able to find, is a lot less advanced(?) than it is in more modern languages like Python or Java. I kinda got Unity (no relation to the game engine) working, but, much like pathfinding algorithms, it's not something you want to try to add in a hurry. I took the Makefile suggestions literally and ended up with a spaghetti file of declared variables that started making me feel... uncomfortable.
So: I went looking for alternative solutions, and found this article that explains how to use Pytest (a unit test framework for Python) to test C code. With which I was able to compile my pathfinding file and use Pytest to exercise my get_path(...) function. Well, almost.
One of the parameters for get_path is a 2d array that represents the obstacles that might be between the angry scientist and the player, and I didn't have much luck creating the ctypes array in a way that was acceptable to the get_path function. Solution: create a get_path_with_empty_array function in the C file that create an empty 2d array and then calls get_path with that. For the purposes of testing whether the algorithm as written will play nicely with the system memory... so far so good. (The other parameters are the x/y coordinates for the attacker and the target (as integers, it might have been easier to send the entity data, but that's one fewer dependency the pathfinding file has))