neighbors property

List<Vec> neighbors

The eight Vecs surrounding this one to the north, south, east, and west and points in between.

Implementation

List<Vec> get neighbors =>
    [for (var direction in Direction.all) this + direction];