The four axial neighbours of a cell: north, east, south, west, in that order.
One frozen table shared by every square-grid algorithm, so a flood fill and a
diffusion field visit neighbours in the same sequence without each keeping its
own copy: roguelike's neighbourOffsets(4) returns this same table.
The four axial neighbours of a cell: north, east, south, west, in that order.
One frozen table shared by every square-grid algorithm, so a flood fill and a diffusion field visit neighbours in the same sequence without each keeping its own copy:
roguelike'sneighbourOffsets(4)returns this same table.