Refactored logic for checking tiles into rj.cfg.