title: Maze solving algorithm in C
body: <p>basically, I'm trying to implement an algorithm in C that can solve a maze using the right-hand or left-hand rule. I get a triangular maze like this in a file:</p>
  
  <p><img src="https://i.imgur.com/FiYbICK.png" alt="maze"></p>
  
  <p>I have already implemented functions to parse the file and load the maze into a dynamic 2D array. From the values in the array, I can tell whether each field has or doesn't have a right border, left border, and vertical border (top or bottom, depending on the position of the field). I'm also told the coordinates of the starting point (i.e. 6,1 in this particular example) and the initial border to follow (i.e. bottom) and, of course, whether to use the right hand or the left hand rule to find the exit.</p>
  
  <p>I'm supposed to list the coordinates of the fields that lead to the exit. I've basically implemented all the necessary functions to parse and check the maze validity, but I don't exactly understand how to put a right hand and left hand rule in an algorithm. I hope this is enough information to understand what I'm trying to do. I don't necessarily need specific code, I only need to understand how to actually go about this.</p>
  
  <p>Thanks.</p>