numCreatures = 0;
int count = 0;
// max ALLOWED_FAILS fails to place all creatures before we give up
while (numCreatures < NUMBER_OF_CREATURES && count < ALLOWED_FAILS) {
int level = Rand.randUniform((int) (player.getLevel() * LEVEL_RATIO), player.getLevel());
CreatureSpawner creatureSpawner = new CreatureSpawner();
Creature creature = new Creature(creatureSpawner.calculateNextCreature(level));
if (StendhalRPAction.placeat(this, creature, Rand.randUniform(MIN_X, MAX_X), Rand.randUniform(MIN_Y, MAX_Y))) {
numCreatures++;
} else {
logger.info(" could not add a creature to adventure island: " + creature);
count++;