The question is this, when I use a simple Path A * I have the path between point A to point B, but what I need is for that path to go through all the available houses, for example:
Using Path A * it returns me like this:
The rule is to go through all spaces without jumping square and not repeat, one more rule is not to walk diagonally.
I don't know if there is an algorithm for that and I don't even know how to start doing it, if someone can help me with that.
Thank you