Exemplo n.º 1
0
        public static bool CanBuyImprovement(AgricolaPlayer player, ImprovementActionData data, out ResourceCache[] costs)
        {
            costs = null;
            var card = ((AgricolaGame)player.Game).GetCard(data.Id);

            if (!Curator.IsImprovementAvailable(player, data.Id) ||
                !Curator.CanAffordCard(player, data.Id, data.PaymentOption, out costs) ||
                (card is MinorImprovement && !card.PrerequisitesMet(player)))
            {
                return(false);
            }
            return(true);
        }