I have a pattern of size x*y represented as a vector of size x*y. And a crafting grid of size c*r, also represented using a vector. Now I need to find if the pattern in the crafting grid matches the pattern (Imagine the minecraft crafting table)
Anyone has some good ideas/algorithms on how to match the pattern? For example I can have the pattern of size 1*2:
s
s
And the crafting table of 3x3:
_s_
_s_
___
And Thus the pattern is matching (_ represents air)