Restrict the tile selector to the map boundaries.
Move the map selector logic to a system