bool IsSeasonalAchievementCompleted(BibaEquipment equipment, BibaAchievementConfig config) { if (config is BibaSeasonalAchievementConfig) { var seasonalConfig = (BibaSeasonalAchievementConfig)config; var timePlayedInSeason = equipment.TimesPlayed.Where(date => date >= seasonalConfig.StartDate && date <= seasonalConfig.EndDate).Count(); return(timePlayedInSeason >= seasonalConfig.TimePlayed); } return(false); }
bool IsBasicAchievementCompleted(BibaEquipment equipment, BibaAchievementConfig config) { return(equipment.NumberOfTimePlayed >= config.TimePlayed); }