Пример #1
0
        private CardFeasibilityStudy GetCardStudy(Card card,
                                                  Player player,
                                                  IPool bank,
                                                  IPool bonusDesirability,
                                                  Dictionary <TokenColour, decimal> newColourNobility)
        {
            var deficit    = player.Budget.DeficitFor(card.Cost);
            var deficitSum = Math.Max(0, deficit.Sum - player.Purse.Gold);
            var scarcity   = bank.DeficitFor(deficit).Sum;
            var repulsion  = 0m
                             + deficitSum
                             + _options.Biases.FromScarcity(scarcity)
                             + _options.Biases.FromVictoryPoints(card.VictoryPoints)
                             + _options.Biases.FromCardBonus(bonusDesirability, card.BonusGiven)
                             + newColourNobility[card.BonusGiven];

            return(new CardFeasibilityStudy {
                Card = card, Deficit = deficit, Repulsion = repulsion, DeficitWithGold = deficitSum
            });
        }