Exemplo n.º 1
0
        public Region GetBestRegion(IEnumerable <Region> choices = null)
        {
            if (choices is null)
            {
                choices = new Region[] { Region.NA, Region.EU, Region.CIS, Region.SEA };
            }

            if (WarshipsAccounts is not null && WarshipsAccounts.Count > 0)
            {
                return(WarshipsAccounts.OrderByDescending(p => p.IsPrimary).ThenBy(p => p.Created).Select(p => p.Region).FirstOrDefault(region => choices.Contains(region)));
            }

            return(default);
Exemplo n.º 2
0
 public WarshipsPlayer GetPrimaryWarshipsAccount() => WarshipsAccounts.SingleOrDefault(e => e.IsPrimary);