pabenito / Obstacle-Map

This project creates a random obstacle map (matrix) where an obstacle is generated with a 100% of probability if it has at least another wall around it, but less or equal than MAX_AROUND_WALLS obstacles surrounding it: (0 < obstacles around <= MAX_AROUND_WALLS). To count the number of walls around, it is used the 8-neighbour model. However, if the previous condition is not followed, the probability of generating that wall, which decreases exponentially, changes dynamically with the obstacles already placed. A lot of different types of maps can be generated in a O(rows * cols) time guaranteed.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pabenito/Obstacle-Map Stargazers