I have difficulties solving this program, so I'll be very happy if someone h

elps me.

Thanks in advance!

Find a way in a maze

Write a program that finds way between two points in certain maze.

The maze is rectangular matrix which consists of cells. Each cell is from on

e of the following 4 types and it can be represented with one positive numbe

r.

1.Void (blank space) – This cell is empty and you can go through it. Repres

ented by 0 (zero).

2.Wall – in this cell there is a wall and you can’t go through it. Represen

ted by 100.

3.Key – this cell contains a key with given number. You can go through it,

and when you do that a “door with corresponding number to the key opens. Re

presented by the numbers from 1 to 20. Key number 1, 2, ………20.

4.Door – this cell is a wall. You can walk through it only if you walked on

key which is corresponding to this wall. Represented by the numbers from 10

1 to 120, respectively for wall number 101, 102, 103, ……….120.

In the maze there can not be more than 20 walls, and 20 keys.

Information for the maze can be written in text file according to this forma

t:

On the first line there are 2 positive integer numbers N(3 < N < 10)- the wi

dth of the maze and M(3 < M < 10)- length of the maze. Followed by 4 numbers

SX(0 < SX < N) , SY(0 < SY < M) , TX(0 < TX < N) , TY(0 < TY < M),

which are the start position (SX, SY) and the final position (TX, TY) in the

maze. These are the two positions between you have to find a way.

Then there is M in number of lines with N in numbers of numbers on each line

. They describe the contents of each cell of the maze as it is described in

1(void), 2(wall), 3(key), 4(door).