add few tests to spawn cells to the world.

The tests checks if the world can spawn new cell,
it also checks if the world cannot spawn new cell if there isn't any space
left.
I did a bit of refactoring too.