Added logic to not generate random tiles when not necessary