Orasund/elm-cellautomata/3.1.1

CellAutomata.Grid

This module should help you work with automatas on a grid.

( Int, Int )
-> List
{ location : ( Int, Int )
, direction : ( Int, Int )
}

Compute all 8 surrounding neighbors

( Int, Int )
-> List
{ location : ( Int, Int )
, direction : ( Int, Int )
}

Compute the 4 direct neighbors

( Int, Int )
-> List
{ location : ( Int, Int )
, direction : ( Int, Int )
}

Compute the 4 diagonal neighbors