Clang static analyzer complains about a number of count_*_near_tile() functions that first iterate adjacent tiles, and count them in the process, and then use that total as a divider. While the iteration can go over less-than-number-of-directions tiles when on the edge of the world, it would result in zero only for a single tile world. So this is more about silencing the report than fixing an actual bug.
Clang static analyzer complains about a number of count_*_near_tile() functions that first iterate adjacent tiles, and count them in the process, and then use that total as a divider. While the iteration can go over less-than-number-of-directions tiles when on the edge of the world, it would result in zero only for a single tile world. So this is more about silencing the report than fixing an actual bug.