I need help on how to access data in a matrix (vector of vector) in a expanding round around an origin point (0) and that follow the cells around it like in the visuals I included. It's to check the value of cells adjacent to the first one and then put the distance to the origin of the cell. Its for a labyrinth so I can't just use math to determine it since there might be some walls between them.
Also I can't use the algorithm libraries
Can someone help me ? Thanks !
I tried using different method but none of them seems to be working since I still cant get some values. it's for a programming assignment so I need you guys help !