Hi everybody, I would like to ask you if there is any "trick" or "fast way" of doing the following program.
You are given a Matrix of chars. For every char there are 3 possibilities: that it is a dot '.' which means the position is empty, that it is a 'T' which means that there is a tree and that there is an 'F' which means that there is a fire.
If in the position i,j of the matrix, there is a fire then the directly, top, left, right and bottom positions get also in fire if there was a tree 'T' in them.
The initial position that was in fire becomes empty '.' in the next step.
The objective of the program is to write a function, that given a certain Matrix M with (maybe) a fire, prints the outcome of propagating the fire until there is no fire left.