Remove the <n> argument from this method. I think it was a bad idea to begin with but at the time I was looking for an expedient solution for getting neighbor squares 2 squares away. Overhaul bounds checking in this method so horizontal (west and east) bounds are checked in addition to vertical (north and south) bounds. For the diagonal directions in particular, it was easy to generate some bogus neighbor squares because this method didn't check for wrapping when calculating horizontal neighbors. |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml |