Fixed AutoTiling on Map Edges

Nested ternary operators. Kill me now.