How to create an adjacency matrix based on a 2D map?
Hello. The problem is the following, there is a map(like the picture). We need to build an adjacency matrix where row 1 is the cell where there is a monster. What kind of algorithm it can be implemented?