I have built a gameboard that consists of a grid, the grid is then randomly assigned, "Walls" to a cell. Once the cells are built, how can I check to see if a certain cell is 'locked in' so that I don't place a player there.
I have thought about this and the first ago I came up with check all sides for four walls, but obviously, a cell could be surrounded by open cells, which are then surrounded by walls.
The other is a "escape to outside" algo, which basically tries to find a path to an outside wall, which would then mean it is not locked in, but if the block is on an outside wall and surrounded by blocks it would be locked in.
How is this typically handled? I'm using python if that matters for any code examples.
Thanks!