Pathfinder-desperation

Hi,

I am stuck in a mathematical programming problem on C#. I can't seem to configure this problem for four damn days. I have asked my peers and googled countless websites and searches still no help.

The goal is to write a function that returns a bool stating whether it was possible to find the exit or not. If it was possible to find the exit, print the path followed. The function must have as initial parameters the starting point, defined by the row and column. The labyrinth will be always a matrix of char[,] as displayed in the example. ‘e’ – will mark the exit (location to be found) ‘*’ – marks the labyrinth walls

 

Consider the following labyrinth: private static char[,] labyrinth = { {' ', ' ', ' ', '*', ' ', ' ', ' '}, {' ', '', '', '', ' ', '', ' '}, {' ', ' ', ' ', ' ', ' ', '*', ' '}, {' ', '', '', '', '', '*', ' '}, {'*', ' ', ' ', ' ', ' ', ' ', 'e'}, };

by tnawaz via /r/csharp

Leave a Reply