Masker (Masker v0.1.0)

Tool for finding a 2d pattern in a 2d list.

iex> pattern = [[:O, :X, :O], [:O, :X, :O], [:X, :X, :X]] ...> array2d = [ ...> [1, 4, 2, 4, 5], ...> [1, 5, 1, 5, 4], ...> [4, 5, 1, 5, 8], ...> [8, 1, 1, 1, 4], ...> [5, 1, 2, 4, 1] ...> ] ...> Masker.has_pattern?(pattern, array2d)

Link to this section Summary

Functions

Find pattern and return coordinates of each match.

Link to this section Functions

Link to this function

crop(array2d, height, width, row, col)

Specs

crop(list(), integer(), integer(), integer(), integer()) :: list()

Crop a 2d list

Link to this function

has_pattern?(pattern, array2d)

Specs

has_pattern?(list(), list()) :: :none | {:ok, [...]}

Find pattern and return coordinates of each match.

Link to this function

keys_coordinates(pattern)

Specs

keys_coordinates(list()) :: %{required(any()) => list()}