Hi All,
Long time listener, first time requester...
Does anyone know how to determine if an object in an 2D array is enclosed, and if so, by how much 'area'?
In the example below the 'O' is enclosed by 'X's and it's 'area' would be 3...
..xxx..
..x.x..
.x.0x..
.xxxx..
In the example below the 'O' is NOT enclosed
..xxx..
..x....
.x.0x..
.xxxx..
I imagine this involves recursion :( ... but it's been a while...
Any tips/tricks/suggestions?
Thanks all!
Remy-Jay