Ejemplo n.º 1
0
            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));
            }
Ejemplo n.º 2
0
            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)));
            }