private bool IsMinimumBlockerCountSatisfied(ChosenBlockers chosen) { var attackers = chosen .GroupBy(x => x.Attacker) .Select(x => new { Card = x.Key, BlockerCount = x.Count() }) .ToList(); return(attackers.All(attacker => attacker.Card.MinimalBlockerCount <= attacker.BlockerCount)); }
private bool IsBlockerCountSatisfied(ChosenBlockers chosen) { var attackers = chosen .GroupBy(x => x.Attacker) .Select(x => new { Card = x.Key, BlockerCount = x.Count() }) .ToList(); return(attackers.All(attacker => attacker.Card.MinimalBlockerCount <= attacker.BlockerCount && (!attacker.Card.Has().CannotBeBlockedByMoreThanOne || attacker.BlockerCount <= 1))); }