I think this one's ready to go. Please take a look.
Note: One thing I didn't test for is if a place move (during "expand" operation) is attempted against a position that is out of bounds for the layer/map. I'm not sure if that's possible, but I thought I should mention it.
I think this one's ready to go. Please take a look. Note: One thing I didn't test for is if a place move (during "expand" operation) is attempted against a position that is out of bounds for the layer/map. I'm not sure if that's possible, but I thought I should mention it.