using System.Collections.Generic;
using System.Linq;
using Net.Eagle0.Eagle.Views;

namespace eagle {
    public static class ProvinceUtils {
        public static List<BattalionView> OrderedBattalions(ProvinceView province) {
            if (province == null || province.FullInfo == null) { return new List<BattalionView>(); }
            return province.FullInfo.Battalions.OrderBy(b => b, BattalionUtils.BattalionComparer)
                    .ToList();
        }
    }
}