private static void addMonsters(Level level, Rect bounds) { List<Monster> monsters = MonsterFactory.getDungeonMonsters(1); for (int i = 0; i < monsters.Count; i++) { Location monsterLocation = new Location(0, 0); while (!isMonsterCandidate(level, monsterLocation)) { monsterLocation.x = Util.random.Next(bounds.x1, bounds.x2); monsterLocation.y = Util.random.Next(bounds.y1, bounds.y2); } level.addActor(monsters[i], monsterLocation); } }