private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                     CardAcceptance.For(Cards.Embassy, gameState => CountAllOwned(Cards.Embassy, gameState) < 1),
                     CardAcceptance.For(Cards.Duchy),
                     CardAcceptance.For(Cards.Duke));

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Warehouse),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Warehouse),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Warehouse));

                var lowPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.Silver));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
            private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                    CardAcceptance.For(Province.card, ShouldBuyProvinceOverDuchyDuke),
                    CardAcceptance.For(Duke.card, gameState => ShouldBuyDukeOverDuchy(gameState) && ShouldBuyDuchyDukeOverPowerUp(gameState)),
                    CardAcceptance.For(Duchy.card, ShouldBuyDuchyDukeOverPowerUp),
                    CardAcceptance.For(Duke.card, ShouldBuyDuchyDukeOverPowerUp),
                    CardAcceptance.For(Estate.card, gameState => CountOfPile(Province.card, gameState) < 2),
                    CardAcceptance.For(Duke.card, gameState => ShouldBuyDukeOverDuchy(gameState) && AtEndGame(gameState)),
                    CardAcceptance.For(Duchy.card, AtEndGame),
                    CardAcceptance.For(Duke.card, AtEndGame),
                    CardAcceptance.For(Caravan.card, CanDoubleCaravan),
                    CardAcceptance.For(Cartographer.card, gameState => CountAllOwned(Cartographer.card, gameState) < 2),
                    CardAcceptance.For(Gold.card, gameState => gameState.Self.AvailableBuys <= 1));

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Bridge.card),
                    CardAcceptance.For(Silver.card),
                    CardAcceptance.For(Silver.card),
                    CardAcceptance.For(Bridge.card));

                var lowPriority = new CardPickByPriority(
                           CardAcceptance.For(Caravan.card),
                           CardAcceptance.For(Estate.card, gameState => CountOfPile(Province.card, gameState) < 4),
                           CardAcceptance.For(Silver.card));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
            private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                     CardAcceptance.For(Cards.Province, ShouldBuyProvinces),
                     CardAcceptance.For(Cards.Duchy, gameState => CountAllOwned(Cards.Province, gameState) >= 3),
                     CardAcceptance.For(Cards.Estate, gameState => CountOfPile(Cards.Province, gameState) <= 1),
                     CardAcceptance.For(Cards.Salvager, gameState => CountAllOwned(Cards.Copper, gameState) >= 6 && CountAllOwned(Cards.Salvager, gameState) == 0),
                     CardAcceptance.For(Cards.Lookout, gameState => CountAllOwned(Cards.Copper, gameState) >= 6 && CountAllOwned(Cards.Lookout, gameState) == 0),
                     CardAcceptance.For(Cards.Silver, gameState => CountAllOwned(Cards.Silver, gameState) + CountAllOwned(Cards.Festival, gameState) < 2)
                     );

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.Festival),
                    CardAcceptance.For(Cards.Library),
                    CardAcceptance.For(Cards.Festival),
                    CardAcceptance.For(Cards.Highway),
                    CardAcceptance.For(Cards.Highway),
                    CardAcceptance.For(Cards.Festival),
                    CardAcceptance.For(Cards.Festival),
                    CardAcceptance.For(Cards.Library),
                    CardAcceptance.For(Cards.Festival)
                    );

                var lowPriority = new CardPickByPriority(
                    CardAcceptance.For(Cards.Highway));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
            private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.Province),
                           CardAcceptance.For(Cards.Duchy, gameState => CountOfPile(Cards.Province, gameState) <= 4));

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.FishingVillage),
                    CardAcceptance.For(Cards.Chapel));

                var lowPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.FishingVillage, gameState => CountAllOwned(Cards.FishingVillage, gameState) < 2),
                           CardAcceptance.For(Cards.PoorHouse));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
            private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                    CardAcceptance.For(Cards.Province),
                    CardAcceptance.For(Cards.IllGottenGains, Default.ShouldGainIllGottenGains),
                    CardAcceptance.For(Cards.Gold, gameState => CountOfPile(Cards.Province, gameState) >= 6),
                    CardAcceptance.For(Cards.Duchy),
                    CardAcceptance.For(Cards.Estate, gameState => CountOfPile(Cards.Province, gameState) < 2));

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.Silver));

                var lowPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.Silver),
                           CardAcceptance.For(Cards.Copper));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
            private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                     CardAcceptance.For(Cards.Province, gameState => CountAllOwned(Cards.Gold, gameState) >=2),
                     CardAcceptance.For(Cards.Duchy, gameState => CountOfPile(Cards.Province, gameState) <= 4),
                     CardAcceptance.For(Cards.Gold),
                     CardAcceptance.For(Cards.Laboratory));

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.SpiceMerchant),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Warehouse));

                var lowPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.Silver),
                           CardAcceptance.For(Cards.Estate, gameState => CountOfPile(Cards.Province, gameState) <= 4));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
Пример #7
0
            static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                         CardAcceptance.For(Cards.Province, gameState => gameState.players.CurrentPlayer.AllOwnedCards.CountOf(Cards.Gold) > 2),
                         CardAcceptance.For(Cards.Duchy, gameState => CountOfPile(Cards.Province, gameState) < 5),
                         CardAcceptance.For(Cards.Estate, gameState => CountOfPile(Cards.Province, gameState) < 2),
                         CardAcceptance.For(Cards.Gold));

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Warehouse),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Warehouse));

                var lowPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.Silver));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
            private static ICardPicker PurchaseOrder(bool shouldBuySpiceMerchant, bool shouldBuyPlaza)
            {
                var highPriority = new CardPickByPriority(
                     CardAcceptance.For(Cards.Province, CardAcceptance.AlwaysMatch, CardAcceptance.OverPayMaxAmount));

                var buildOrder = new CardPickByBuildOrder(
                    shouldBuySpiceMerchant == true ? CardAcceptance.For(Cards.SpiceMerchant) : CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Embassy),
                    CardAcceptance.For(Cards.Tunnel),
                    CardAcceptance.For(Cards.Embassy),
                    shouldBuyPlaza ? CardAcceptance.For(Cards.Plaza) : null);

                var lowPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.Duchy, gameState => CountOfPile(Cards.Province, gameState) <= 4),
                           CardAcceptance.For(Cards.Tunnel, gameState => gameState.Self.AllOwnedCards.Count > 13),
                           CardAcceptance.For(Cards.Silver));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
            private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                     CardAcceptance.For(Cards.GreatHall, gameState => CardBeingPlayedIs(Cards.IronWorks, gameState)),
                     CardAcceptance.For(Cards.Province),
                     CardAcceptance.For(Cards.HuntingGrounds, gameState => CountAllOwned(Cards.Gold, gameState) >= 1 ),
                     CardAcceptance.For(Cards.Gold),
                     CardAcceptance.For(Cards.Pillage, gameState => CountAllOwned(Cards.Gold, gameState) == 0),
                     CardAcceptance.For(Cards.Duchy, gameState => CountOfPile(Cards.Province, gameState) <= 4));

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.IronWorks),
                    CardAcceptance.For(Cards.Silver));

                var lowPriority = new CardPickByPriority(
                       CardAcceptance.For(Cards.IronWorks, gameState => CountAllOwned(Cards.IronWorks, gameState) < 2),
                       CardAcceptance.For(Cards.Remodel),
                       CardAcceptance.For(Cards.Silver));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
Пример #10
0
            private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                          CardAcceptance.For(Cards.Province, CardAcceptance.AlwaysMatch, CardAcceptance.OverPayMaxAmount),
                          CardAcceptance.For(Cards.Duchy, gameState => CountOfPile(Cards.Province, gameState) <= 2),
                          CardAcceptance.For(Cards.Estate, gameState => CountOfPile(Cards.Province, gameState) <= 2),
                          CardAcceptance.For(Cards.Butcher, gameState => CountAllOwned(Cards.Butcher, gameState) < 2),
                          CardAcceptance.For(Cards.Estate, gameState => CountOfPile(Cards.Province, gameState) <= 3));

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.Silver),
                    CardAcceptance.For(Cards.Watchtower),
                    CardAcceptance.For(Cards.Plaza),
                    CardAcceptance.For(Cards.Plaza),
                    CardAcceptance.For(Cards.Watchtower)
                    );

                var lowPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.Plaza),
                           CardAcceptance.For(Cards.Watchtower));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
            private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                     CardAcceptance.For(Cards.Province, gameState => gameState.Self.AvailableBuys >= 4 || CountAllOwned(Cards.Province, gameState) > 0),
                     CardAcceptance.For(Cards.Duchy, gameState => CountAllOwned(Cards.Province, gameState) >= 3),
                     CardAcceptance.For(Cards.Estate, gameState => CountOfPile(Cards.Province, gameState) <= 1));
                     //CardAcceptance.For(Cards.Jester, gameState => CountAllOwned(Cards.Jester, gameState) == 0));  // jester actually hurts in a non mirror match

                /*//  Intuitive guess as to the right build order, not correct it seeems.
                var buildOrder = new CardPickByBuildOrder(
                    Cards.Armory,
                    Cards.Silver,
                    Cards.WanderingMinstrell,
                    Cards.Watchtower,
                    Cards.Rats,
                    Cards.Watchtower);*/

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.Armory),
                    CardAcceptance.For(Cards.Watchtower),
                    CardAcceptance.For(Cards.Rats),
                    CardAcceptance.For(Cards.Watchtower));

                var lowPriority = new CardPickByPriority(
                       CardAcceptance.For(Cards.Bridge, ShouldBuyBridge),
                       CardAcceptance.For(Cards.WanderingMinstrell),
                       CardAcceptance.For(Cards.Watchtower, gameState => CountAllOwned(Cards.Watchtower, gameState) < 3));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }
            private static ICardPicker PurchaseOrder()
            {
                var highPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.Province, ShouldBuyProvince),
                           CardAcceptance.For(Cards.Library, gameState => CountAllOwned(Cards.Library, gameState) < 1),
                           CardAcceptance.For(Cards.Count, gameState => CountAllOwned(Cards.Count, gameState) < 1));

                var buildOrder = new CardPickByBuildOrder(
                    CardAcceptance.For(Cards.FishingVillage),
                    CardAcceptance.For(Cards.Library),
                    CardAcceptance.For(Cards.Count),
                    CardAcceptance.For(Cards.Library));

                var lowPriority = new CardPickByPriority(
                           CardAcceptance.For(Cards.PoorHouse, gameState => CountAllOwned(Cards.PoorHouse, gameState) < 2 &&
                                                                                CountAllOwned(Cards.Count, gameState) >= 1),
                           CardAcceptance.For(Cards.FishingVillage));

                return new CardPickConcatenator(highPriority, buildOrder, lowPriority);
            }