hex-world
    Preparing search index...

    Function riverBanks

    • Which bank each edge of a river cell lies on.

      Returns six entries indexed by edge: -1 for the two edges the river runs through, 0 for the edges on one bank and 1 for the other. Returns null when the cell has no through-river — no river, a source or mouth (the channel ends at the centre, so there is only one bank), a confluence (three or more channels, no road is drawn there at all), or a hairpin where the river enters and leaves through adjacent edges, which leaves one bank with no edges on it.

      Parameters

      • map: HexMap
      • col: number
      • row: number

      Returns Int8Array<ArrayBufferLike> | null