Masker
It check where is the 2d pattern included in a 2d array:
Ex:
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)
> {:ok, [%{col: 1, row: 1}]}Installation
If available in Hex, the package can be installed
by adding masker to your list of dependencies in mix.exs:
def deps do
[
{:masker, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/masker.