I don't get the neighboring tile numbering. Is it like this?
0 1 2
3 4 5
6 7 8
What's the current cell?A diagram would help
You're talking about the post, or something in the source code?
In the post, it just counts how many of the 8 tiles are floor (which means 9 possibilities, including none of them). They aren't assigned index numbers.
Edit: ha, we all jumped on you. So now this is explained three different ways.
There’s no numbering, it just counts the neighbours. ‘0-2’ means zero, one or two neighbours.
Nothing in the description refers to individual neighbouring cells. All those numbers are counts -- if 0 to 2 of the neighbouring cells are rock, do this, etc.