mwg API
    Preparing search index...

    Variable NEIGHBOURS4Const

    NEIGHBOURS4: ReadonlyArray<readonly [number, number]> = ...

    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.