Made DijkstraMap conform to Path interface, and extend Path. No longer needs width and height, it flood-fills outwards. Added a bunch of tests. Should also be much faster now (not perf'd yet though).
This includes some API changes. Got rid of getMap and getGoals, since _map and _goals shouldn't be public now (need to manage access so we can set dirty flag). Should be enough other methods to provide appropriate access to these; if not more can be added.
This is a pretty major overhaul (git doesn't recognize it as the same file after moving it), so please let me know if I broke anyone's code outside of API changes.
Made DijkstraMap conform to Path interface, and extend Path. No longer needs width and height, it flood-fills outwards. Added a bunch of tests. Should also be much faster now (not perf'd yet though).
This includes some API changes. Got rid of
getMap
andgetGoals
, since_map
and_goals
shouldn't be public now (need to manage access so we can set dirty flag). Should be enough other methods to provide appropriate access to these; if not more can be added.Related: https://github.com/ondras/rot.js/issues/78#issuecomment-318939273
This is a pretty major overhaul (git doesn't recognize it as the same file after moving it), so please let me know if I broke anyone's code outside of API changes.