title: How to detect collision from a text file
body: <p>I am creating a pacman game where the map is read in from a file(<a href="http://imgur.com/dfRNIAs" rel="nofollow">http://imgur.com/dfRNIAs</a>) and painted(just a breif example of the things i need to be detecting collision with): </p>
  
  <pre><code>case 'h': //horizontal line
            //create solid brush
            //brush = new SolidBrush(Color.Blue);
      g.FillRectangle(Brushes.Blue, x * cellSize, y * cellSize + cellSize / 2 - 1, cellSize, 3);
      break;
  case 'v': //vertical line
            //create solid brush
            //brush = new SolidBrush(Color.Blue);
      g.FillRectangle(Brushes.Blue, x * cellSize + cellSize / 2 - 1, y * cellSize, 3, cellSize);
      break;
  </code></pre>
  
  <p>I am then getting a pacman image from file. I am able to move it about at the moment but I am not sure how to go about checking if it collides with one of the walls. </p>
  
  <p>I have thought about creating a rectangle for the pacman image and then trying to compare it with the case statements I have but after that I am not too sure what to do.  </p>
  
  <p>Thanks for any help. </p>