public static PossibleMasterGameYear GetPossibleMasterGameYear(MasterGameYear masterGame, IReadOnlyList <PublisherSlot> openNonCounterPickSlots, HashSet <MasterGame> publisherStandardMasterGames, HashSet <MasterGame> myPublisherMasterGames, MasterGameWithEligibilityFactors eligibilityFactors, LocalDate currentDate) { bool isEligible = SlotEligibilityService.GameIsEligibleInLeagueYear(eligibilityFactors); bool taken = publisherStandardMasterGames.Contains(masterGame.MasterGame); bool alreadyOwned = myPublisherMasterGames.Contains(masterGame.MasterGame); bool isReleased = masterGame.MasterGame.IsReleased(currentDate); bool willRelease = masterGame.WillRelease(); bool hasScore = masterGame.MasterGame.CriticScore.HasValue; bool isEligibleInOpenSlot = SlotEligibilityService.GameIsEligibleInOpenSlot(openNonCounterPickSlots, eligibilityFactors); PossibleMasterGameYear possibleMasterGame = new PossibleMasterGameYear(masterGame, taken, alreadyOwned, isEligible, isEligibleInOpenSlot, isReleased, willRelease, hasScore); return(possibleMasterGame); }
public PossibleMasterGameYear GetPossibleMasterGameYear(MasterGameYear masterGame, IReadOnlyList <PublisherSlot> openNonCounterPickSlots, HashSet <MasterGame> publisherStandardMasterGames, HashSet <MasterGame> myPublisherMasterGames, MasterGameWithEligibilityFactors eligibilityFactors, IEnumerable <LeagueTagStatus> tagsForSlot, LocalDate currentDate) { var tagsToUse = eligibilityFactors.TagOverrides.Any() ? eligibilityFactors.TagOverrides : masterGame.MasterGame.Tags; var claimErrors = LeagueTagExtensions.GameHasValidTags(tagsForSlot, new List <LeagueTagStatus>(), masterGame.MasterGame, tagsToUse, currentDate); bool isEligible = !claimErrors.Any(); bool taken = publisherStandardMasterGames.Contains(masterGame.MasterGame); bool alreadyOwned = myPublisherMasterGames.Contains(masterGame.MasterGame); bool isReleased = masterGame.MasterGame.IsReleased(currentDate); bool willRelease = masterGame.WillRelease(); bool hasScore = masterGame.MasterGame.CriticScore.HasValue; bool isEligibleInOpenSlot = SlotEligibilityService.GameIsEligibleInOpenSlot(openNonCounterPickSlots, eligibilityFactors); PossibleMasterGameYear possibleMasterGame = new PossibleMasterGameYear(masterGame, taken, alreadyOwned, isEligible, isEligibleInOpenSlot, isReleased, willRelease, hasScore); return(possibleMasterGame); }