title: How to search a grid for matrices and match patterns?
body: <p><a href="https://i.stack.imgur.com/ZIC3m.jpg" rel="nofollow noreferrer">Search matrix</a></p>
  
  <p>I want to search a grid and try to find all possible locations to place game objects on. Game objects are of different sizes.</p>
  
  <p>Constraints: Dark gray tiles of the game objects must be on the black path tiles and gray tiles must be on white tiles as seen in the picture attached.</p>
  
  <p>I already have the code for grid and the black path. Every single cell including the path cells is aware about its neighbouring cells. </p>
  
  <p>What kind of a search algorithm is needed to get the desired result? Thanks.</p>