fixed random numbers in the spawn tile function