# `Cauldron2D.Grid.Coarse.Regions`
[🔗](https://github.com/jaman/cauldron/blob/v0.2.2/cauldron_2d/lib/cauldron_2d/grid/coarse/regions.ex#L1)

The regions of a grid for `Cauldron2D.Grid.Coarse`: within each block of `block` tiles
a side, the open tiles joined edge to edge, numbered from 1.

`build/3` returns:

  * `:labels` — a binary of one 32-bit region number for each tile, row by row, 0 for a
    tile that is not open
  * `:count` — how many regions there are
  * `:spots` — a tuple, the region numbered `n` at index `n - 1`, of the region's tile
    nearest its middle
  * `:links` — a tuple in the same order of `[{region, cost}]`, the regions a region
    touches edge to edge across a block border, the cost the distance between spots
  * `:components` — a tuple in the same order of the number shared by every region that
    can reach every other

# `t`

```elixir
@type t() :: %{
  labels: binary(),
  count: non_neg_integer(),
  spots: tuple(),
  links: tuple(),
  components: tuple()
}
```

# `build`

```elixir
@spec build(
  ({integer(), integer()} -&gt; boolean()),
  Cauldron2D.Grid.Coarse.Space.t(),
  pos_integer()
) ::
  t()
```

The regions of the tiles `open?` accepts in `space`, in blocks of `block` tiles.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
