private void PlaceEnemies() { // for (int j = 1; j < 2; j++) { // var numberOfEnemies = 1; // for (int i = 0; i < numberOfEnemies; i++) { // if (map.DoesRoomHaveWalkableSpace(map.Rooms[j])) { // Point randomRoomPos = map.GetRandomPositionInRoom(map.Rooms[j]); // if (randomRoomPos != null) { // map.AddEnemy(ActorGenerator.CreateEnemy(game, level, map.GetRandomPositionInRoom(map.Rooms[j]))); // } // } // } // } for (int j = 1; j < mapManager.Rooms.Count; j++) { if (Dice.Roll("1D10") < 7) { var numberOfEnemies = 1; for (int i = 0; i < numberOfEnemies; i++) { if (mapManager.DoesRoomHaveWalkableSpace(mapManager.Rooms[j])) { Point randomRoomPos = mapManager.GetRandomPositionInRoom(mapManager.Rooms[j]); if (randomRoomPos != null) { mapManager.AddEnemy(ActorGenerator.CreateEnemy(game, mapLevel, mapManager.GetRandomPositionInRoom(mapManager.Rooms[j]))); } } } } } }