title: Deciding if block is movable in grid space
body: <p>I have a block that can be size 1x1, 2x2, or 3x3. It sits on a grid with different colored spaces. The only time a block can move between point (x1, y1) and (x2, y2) is if there are no spaces between the two points that have different colors. See the attached picture for an example showing when the block(s) can move.</p>
  
  <p><a href="https://i.stack.imgur.com/mPGh6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mPGh6.jpg" alt="enter image description here"></a></p>
  
  <p>My struggle stands that I cannot come up with a proper algorithm in my c++ code for finding out whether or not the block can move between two clicks points. Any suggestions for how this would work?</p>
  
  <p>Another example from the Example Picture posted above, a 2x2 block cannot move down to (0,3) since there is a blue block in the way. </p>
  
  <p>The blocks can be moved in horizontal, vertical, or diagonal directions. 
  The blocks can be moved several spaces at a time, as long as they are not intersecting a different color that is in the way.</p>