/* * public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) * { * if (gameState.CurrentContext.CurrentCard != Cards.Steward) * return base.ChooseBetween(gameState, acceptableChoice); * * if (CountInHand(Cards.Estate, gameState) + CountInHand(Cards.Curse, gameState) + CountInHand(Cards.Copper, gameState) >= 2) * return PlayerActionChoice.Trash; * if (gameState.Self.AvailableActions > 0 && gameState.Self.CardsInDeck.Count + gameState.Self.Discard.Count >= 2) * return PlayerActionChoice.PlusCard; * else * return PlayerActionChoice.PlusCoin; * }*/ public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard != Cards.Steward) { return(base.ChooseBetween(gameState, acceptableChoice)); } if (CountInHand(Cards.Estate, gameState) + CountInHand(Cards.Curse, gameState) >= 2) { return(PlayerActionChoice.Trash); } if (CountInHand(Cards.Copper, gameState) >= 2 && gameState.Self.ExpectedCoinValueAtEndOfTurn >= 7) { return(PlayerActionChoice.Trash); } // if (CountAllOwned(Cards.Copper, gameState) >= 7) // return PlayerActionChoice.Trash; if (gameState.Self.AvailableActions > 0 && gameState.Self.CardsInDeck.Count + gameState.Self.Discard.Count >= 2) { return(PlayerActionChoice.PlusCard); } else { return(PlayerActionChoice.PlusCoin); } }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.Minion) { if (CountInHand(Cards.Minion, gameState) >= 2) return PlayerActionChoice.PlusCoin; if (HasCardInHand(Cards.Butcher, gameState) && HasCardInHand(Cards.Gold, gameState)) return PlayerActionChoice.PlusCoin; if (gameState.Self.ExpectedCoinValueAtEndOfTurn + CountInHand(Cards.Minion, gameState) * 2 >= 6) return PlayerActionChoice.PlusCoin; if (HasCardInHand(Cards.Soothsayer, gameState)) { return PlayerActionChoice.PlusCoin; } return PlayerActionChoice.Discard; } if (gameState.CurrentContext.CurrentCard == Cards.Pawn) { if (acceptableChoice(PlayerActionChoice.PlusAction)) return PlayerActionChoice.PlusAction; return PlayerActionChoice.PlusCard; } return base.ChooseBetween(gameState, acceptableChoice); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (acceptableChoice(PlayerActionChoice.Trash)) { bool wantToTrash = WillPlayCountCardForTrash(this.playerAction, gameState); if (wantToTrash) { return(PlayerActionChoice.Trash); } else if (PreferMoneyOverDuchy(this.playerAction, gameState)) { return(PlayerActionChoice.PlusCoin); } else { return(PlayerActionChoice.GainCard); } } else { if (Strategy.HasExactlyOneActionInHand(gameState)) { return(PlayerActionChoice.TopDeck); } else if (ShouldGainCopper(gameState)) { return(PlayerActionChoice.GainCard); } else { return(PlayerActionChoice.Discard); } } }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.Governor) return PlayerActionChoice.GainCard; return base.ChooseBetween(gameState, acceptableChoice); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (CardBeingPlayedIs(Cards.Graverobber, gameState)) { // always prefer trashing cards that might get convertd to victory points if (gameState.Self.Hand.AnyWhere(card => CardTypes.Graverobber.CardValidToTrash(card) && card.CurrentCoinCost(gameState.Self) >= 5 && HasCardIn(card, this.trashOrder, gameState))) return PlayerActionChoice.Trash; // otherwise prefer to gain a card from trash if you are trying to gain it if (gameState.trash.HasCard(c => CardTypes.Graverobber.CardValidToGainFromTrash(c, gameState.Self) && HasCardIn(c, this.purchaseOrder, gameState))) { return PlayerActionChoice.GainCard; } // otherwise, you really want to do nothing // otherwise gain whatever u can from the trash return PlayerActionChoice.GainCard; } else if (CardBeingPlayedIs(Cards.Squire, gameState)) { if (gameState.Self.AvailableActions == 0) return PlayerActionChoice.PlusAction; else return PlayerActionChoice.PlusBuy; } return base.ChooseBetween(gameState, acceptableChoice); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (acceptableChoice(PlayerActionChoice.Trash)) { bool wantToTrash = WillPlayCountCardForTrash(this.playerAction, gameState); if (wantToTrash) { return PlayerActionChoice.Trash; } else if (PreferMoneyOverDuchy(this.playerAction, gameState)) { return PlayerActionChoice.PlusCoin; } else { return PlayerActionChoice.GainCard; } } else { if (Strategy.HasExactlyOneActionInHand(gameState)) { return PlayerActionChoice.TopDeck; } else if (ShouldGainCopper(gameState)) { return PlayerActionChoice.GainCard; } else { return PlayerActionChoice.Discard; } } }
public PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { var saved = gameState.self; gameState.self = this.self; var result = this.playerAction.ChooseBetween(gameState, acceptableChoice); gameState.self = saved; return result; }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.Self.CardsBeingRevealed.HasCard(Cards.Silver)) { return(PlayerActionChoice.Discard); } return(PlayerActionChoice.Trash); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { IPlayerAction playerAction = this.GetActionForCurrentCardContext(gameState); if (playerAction != null) return playerAction.ChooseBetween(gameState, acceptableChoice); else return base.ChooseBetween(gameState, acceptableChoice); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (HasCardInHand(Cards.Gold, gameState)) return PlayerActionChoice.Trash; else if (gameState.Self.ExpectedCoinValueAtEndOfTurn >= 6 && gameState.Self.ExpectedCoinValueAtEndOfTurn < 8) return PlayerActionChoice.PlusCard; else return PlayerActionChoice.GainCard; }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (this.defaultCardResponses.ShouldDeferForCardInPlay(gameState)) { return(this.defaultCardResponses.ChooseBetween(gameState, acceptableChoice)); } return(base.ChooseBetween(gameState, acceptableChoice)); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if ( Strategy.CountOfPile(Dominion.Cards.Province, gameState) > 7 && Strategy.CountInHandFrom(this.playerAction.trashOrder, gameState) >= 2 ) return PlayerActionChoice.Trash; else if (gameState.Self.ExpectedCoinValueAtEndOfTurn >= 6) return PlayerActionChoice.PlusCoin; else return PlayerActionChoice.PlusCard; }
public PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { var saved = gameState.self; gameState.self = this.self; var result = this.playerAction.ChooseBetween(gameState, acceptableChoice); gameState.self = saved; return(result); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.Doctor) { if (gameState.Self.CardsBeingRevealed.HasCard(Cards.Silver)) return PlayerActionChoice.Discard; return PlayerActionChoice.Trash; } else return base.ChooseBetween(gameState, acceptableChoice); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.Doctor) { return(PlayerActionChoice.Trash); } else { return(base.ChooseBetween(gameState, acceptableChoice)); } }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.Self.CardsInDeckAndDiscard.Count() > 3) return PlayerActionChoice.PlusCard; if (ShouldGainCard(gameState, Dominion.Cards.Province) && Strategy.CountInHand(Dominion.Cards.Gold, gameState) > 0) return PlayerActionChoice.Trash; if (ShouldGainCard(gameState, Dominion.Cards.Gold)) return PlayerActionChoice.GainCard; return PlayerActionChoice.PlusCard; }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { // some other player has played a vault. U get to choose whether to discard cards. if (gameState.Self != gameState.players.CurrentPlayer) { if (base.playerAction.discardOrder.CountInSetMatching(gameState, gameState.Self.Hand) >= 2) return PlayerActionChoice.Discard; return PlayerActionChoice.Nothing; } throw new System.Exception("Unexpected choice for vault"); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (HasCardInHand(Cards.Gold, gameState) || HasCardInHand(Cards.MarketSquare, gameState)) { return(PlayerActionChoice.Trash); } //else if (gameState.Self.ExpectedCoinValueAtEndOfTurn >= 6 && gameState.Self.ExpectedCoinValueAtEndOfTurn < 8) //return PlayerActionChoice.PlusCard; else { return(PlayerActionChoice.PlusCard); } }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.Self.Hand.HasCard(Dominion.Cards.Nobles) && gameState.Self.AvailableActions == 0) return PlayerActionChoice.PlusAction; if (playerAction.IsGainingCard(Dominion.Cards.Province, gameState)) return PlayerActionChoice.PlusCard; if (gameState.Self.Hand.AnyWhere(card => card.isAction) && gameState.Self.AvailableActions == 0) return PlayerActionChoice.PlusAction; return PlayerActionChoice.PlusCard; }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { IPlayerAction playerAction = this.GetActionForCurrentCardContext(gameState); if (playerAction != null) { return(playerAction.ChooseBetween(gameState, acceptableChoice)); } else { return(base.ChooseBetween(gameState, acceptableChoice)); } }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { // some other player has played a vault. U get to choose whether to discard cards. if (gameState.Self != gameState.players.CurrentPlayer) { if (base.playerAction.discardOrder.CountInSetMatching(gameState, gameState.Self.Hand) >= 2) { return(PlayerActionChoice.Discard); } return(PlayerActionChoice.Nothing); } throw new System.Exception("Unexpected choice for vault"); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.Governor) { if (HasCardInHand(Cards.Gold, gameState) || HasCardInHand(Cards.MarketSquare, gameState)) return PlayerActionChoice.Trash; //else if (gameState.Self.ExpectedCoinValueAtEndOfTurn >= 6 && gameState.Self.ExpectedCoinValueAtEndOfTurn < 8) //return PlayerActionChoice.PlusCard; else return PlayerActionChoice.PlusCard; } return base.ChooseBetween(gameState, acceptableChoice); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.NativeVillage) { int expectedCoinWithNativeVillage = ValueOf(gameState.Self.Hand) + ValueOf(gameState.Self.CardsOnNativeVillageMat); if (expectedCoinWithNativeVillage >= 6) { return PlayerActionChoice.PutNativeVillageMatInHand; } return PlayerActionChoice.SetAsideTopCardOnNativeVillageMat; } return base.ChooseBetween(gameState, acceptableChoice); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.Doctor) { if (gameState.Self.CardsBeingRevealed.HasCard(Cards.Silver)) { return(PlayerActionChoice.Discard); } return(PlayerActionChoice.Trash); } else { return(base.ChooseBetween(gameState, acceptableChoice)); } }
public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState) { IsValidChoice choices = delegate(PlayerActionChoice choice) { return(choice == PlayerActionChoice.PlusCard || choice == PlayerActionChoice.PlusAction || choice == PlayerActionChoice.PlusCoin || choice == PlayerActionChoice.GainCard); }; PlayerActionChoice choice1 = currentPlayer.RequestPlayerChooseBetween(gameState, choices); PlayerActionChoice choice2 = currentPlayer.RequestPlayerChooseBetween(gameState, c => choices(c) && c != choice1); ApplyChoice(choice1, currentPlayer, gameState); ApplyChoice(choice2, currentPlayer, gameState); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard != Cards.Graverobber) { return(base.ChooseBetween(gameState, acceptableChoice)); } if (gameState.Self.Hand.HasCard(c => c.isAction)) { return(PlayerActionChoice.Trash); } else { return(PlayerActionChoice.GainCard); } }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (Strategy.CountOfPile(Dominion.Cards.Province, gameState) > 7 && Strategy.CountInHandFrom(this.playerAction.trashOrder, gameState) >= 2) { return(PlayerActionChoice.Trash); } else if (gameState.Self.ExpectedCoinValueAtEndOfTurn >= 6) { return(PlayerActionChoice.PlusCoin); } else { return(PlayerActionChoice.PlusCard); } }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (acceptableChoice(PlayerActionChoice.PutCopperOnTavernMat)) { if (Strategy.CountInHand(Dominion.Cards.Copper, gameState) > 0) { return(PlayerActionChoice.PutCopperOnTavernMat); } } if (acceptableChoice(PlayerActionChoice.PlusCoinPerCoppperOnTavernMat)) { return(PlayerActionChoice.PlusCoinPerCoppperOnTavernMat); } return(base.ChooseBetween(gameState, acceptableChoice)); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.Self.CardsInDeckAndDiscard.Count() > 3) { return(PlayerActionChoice.PlusCard); } if (ShouldGainCard(gameState, Dominion.Cards.Province) && Strategy.CountInHand(Dominion.Cards.Gold, gameState) > 0) { return(PlayerActionChoice.Trash); } if (ShouldGainCard(gameState, Dominion.Cards.Gold)) { return(PlayerActionChoice.GainCard); } return(PlayerActionChoice.PlusCard); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.Self.Hand.HasCard(Dominion.Cards.Nobles) && gameState.Self.AvailableActions == 0) { return(PlayerActionChoice.PlusAction); } if (playerAction.IsGainingCard(Dominion.Cards.Province, gameState)) { return(PlayerActionChoice.PlusCard); } if (gameState.Self.Hand.AnyWhere(card => card.isAction) && gameState.Self.AvailableActions == 0) { return(PlayerActionChoice.PlusAction); } return(PlayerActionChoice.PlusCard); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.Governor) { if (HasCardInHand(Cards.Gold, gameState)) { return(PlayerActionChoice.Trash); } else if (gameState.Self.ExpectedCoinValueAtEndOfTurn >= 6 && gameState.Self.ExpectedCoinValueAtEndOfTurn < 8) { return(PlayerActionChoice.PlusCard); } else { return(PlayerActionChoice.GainCard); } } return(base.ChooseBetween(gameState, acceptableChoice)); }
public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState) { IsValidChoice acceptableFirstChoice = delegate(PlayerActionChoice acceptableChoice) { return(acceptableChoice == PlayerActionChoice.PlusCard || acceptableChoice == PlayerActionChoice.PlusAction || acceptableChoice == PlayerActionChoice.PlusBuy || acceptableChoice == PlayerActionChoice.PlusCoin); }; PlayerActionChoice firstChoice = currentPlayer.RequestPlayerChooseBetween( gameState, acceptableFirstChoice); PlayerActionChoice secondChoice = currentPlayer.RequestPlayerChooseBetween( gameState, acceptableSecondChoice => acceptableSecondChoice != firstChoice && acceptableFirstChoice(acceptableSecondChoice)); DoActionChoice(currentPlayer, firstChoice, gameState); DoActionChoice(currentPlayer, secondChoice, gameState); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (CardBeingPlayedIs(Cards.Graverobber, gameState)) { // always prefer trashing cards that might get convertd to victory points if (gameState.Self.Hand.AnyWhere(card => CardTypes.Graverobber.CardValidToTrash(card) && card.CurrentCoinCost(gameState.Self) >= 5 && HasCardIn(card, this.trashOrder, gameState))) { return(PlayerActionChoice.Trash); } // otherwise prefer to gain a card from trash if you are trying to gain it if (gameState.trash.HasCard(c => CardTypes.Graverobber.CardValidToGainFromTrash(c, gameState.Self) && HasCardIn(c, this.purchaseOrder, gameState))) { return(PlayerActionChoice.GainCard); } // otherwise, you really want to do nothing // otherwise gain whatever u can from the trash return(PlayerActionChoice.GainCard); } else if (CardBeingPlayedIs(Cards.Squire, gameState)) { if (gameState.Self.AvailableActions == 0) { return(PlayerActionChoice.PlusAction); } else { return(PlayerActionChoice.PlusBuy); } } return(base.ChooseBetween(gameState, acceptableChoice)); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (acceptableChoice(PlayerActionChoice.PutCopperOnTavernMat)) { bool wantToBuyAnotherMiser = CountAllOwned(Cards.Miser, gameState) < 2 && gameState.Self.AvailableCoins < Cards.Miser.CurrentCoinCost(gameState.Self) && CardTypes.Miser.PlayerMiserValue(gameState.Self) + gameState.Self.AvailableCoins >= Cards.Miser.CurrentCoinCost(gameState.Self); bool preferCountCoins = wantToBuyAnotherMiser; if (!preferCountCoins && CountInHand(Cards.Copper, gameState) > 0) return PlayerActionChoice.PutCopperOnTavernMat; } if (acceptableChoice(PlayerActionChoice.PlusCoinPerCoppperOnTavernMat)) { return PlayerActionChoice.PlusCoinPerCoppperOnTavernMat; } return base.ChooseBetween(gameState, acceptableChoice); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.Minion) { if (CountInHand(Cards.Minion, gameState) >= 2) { return(PlayerActionChoice.PlusCoin); } if (HasCardInHand(Cards.Butcher, gameState) && HasCardInHand(Cards.Gold, gameState)) { return(PlayerActionChoice.PlusCoin); } if (gameState.Self.ExpectedCoinValueAtEndOfTurn + CountInHand(Cards.Minion, gameState) * 2 >= 6) { return(PlayerActionChoice.PlusCoin); } if (HasCardInHand(Cards.Soothsayer, gameState)) { return(PlayerActionChoice.PlusCoin); } return(PlayerActionChoice.Discard); } if (gameState.CurrentContext.CurrentCard == Cards.Pawn) { if (acceptableChoice(PlayerActionChoice.PlusAction)) { return(PlayerActionChoice.PlusAction); } return(PlayerActionChoice.PlusCard); } return(base.ChooseBetween(gameState, acceptableChoice)); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (acceptableChoice(PlayerActionChoice.PutCopperOnTavernMat)) { bool wantToBuyAnotherMiser = CountAllOwned(Cards.Miser, gameState) < 2 && gameState.Self.AvailableCoins < Cards.Miser.CurrentCoinCost(gameState.Self) && CardTypes.Miser.PlayerMiserValue(gameState.Self) + gameState.Self.AvailableCoins >= Cards.Miser.CurrentCoinCost(gameState.Self); bool preferCountCoins = wantToBuyAnotherMiser; if (!preferCountCoins && CountInHand(Cards.Copper, gameState) > 0) { return(PlayerActionChoice.PutCopperOnTavernMat); } } if (acceptableChoice(PlayerActionChoice.PlusCoinPerCoppperOnTavernMat)) { return(PlayerActionChoice.PlusCoinPerCoppperOnTavernMat); } return(base.ChooseBetween(gameState, acceptableChoice)); }
virtual public PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { return(PlayerMustMakeActionChoice()); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { return(PlayerActionChoice.PlusCard); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (CountInHand(Cards.Nobles, gameState) > 0) return PlayerActionChoice.PlusAction; if (ShouldBuyProvinces(gameState)) return PlayerActionChoice.PlusCard; return gameState.Self.Hand.HasCard(card => card.isAction) ? PlayerActionChoice.PlusAction : PlayerActionChoice.PlusCard; }
public PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { IPlayerAction playerAction = this.GetActionForCardInPlay(gameState); return(playerAction.ChooseBetween(gameState, acceptableChoice)); }
public virtual PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { return PlayerMustMakeActionChoice(); }
override public PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.NativeVillage) { int expectedCoinWithNativeVillage = ValueOf(gameState.Self.Hand) + ValueOf(gameState.Self.CardsOnNativeVillageMat); if (expectedCoinWithNativeVillage >= 6) { return(PlayerActionChoice.PutNativeVillageMatInHand); } return(PlayerActionChoice.SetAsideTopCardOnNativeVillageMat); } return(base.ChooseBetween(gameState, acceptableChoice)); }
internal PlayerActionChoice RequestPlayerChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { PlayerActionChoice choice = actions.ChooseBetween(gameState, acceptableChoice); if (!acceptableChoice(choice)) { throw new Exception("Player made in invalid action choice"); } return choice; }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { return PlayerActionChoice.PlusCard; }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.Self.CardsBeingRevealed.HasCard(Cards.Silver)) return PlayerActionChoice.Discard; return PlayerActionChoice.Trash; }
public virtual PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { return(this.playerAction.ChooseBetween(gameState, acceptableChoice)); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard == Cards.Doctor) return PlayerActionChoice.Trash; else return base.ChooseBetween(gameState, acceptableChoice); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { return(base.ChooseBetween(gameState, acceptableChoice)); }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard != Cards.Graverobber) return base.ChooseBetween(gameState, acceptableChoice); if (gameState.Self.Hand.HasCard(c => c.isAction)) { return PlayerActionChoice.Trash; } else return PlayerActionChoice.GainCard; }
public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { bool wantToTrash = DoesHandHaveCombinationToTrash(gameState) && HasCardFromInHand(TrashOrder(), gameState); if (acceptableChoice(PlayerActionChoice.Trash)) { if (wantToTrash && !ShouldBuyProvince(gameState)) { return PlayerActionChoice.Trash; } else if (gameState.Self.AvailableCoins >= 5 && gameState.Self.AvailableCoins < 8) { return PlayerActionChoice.PlusCoin; } else { return PlayerActionChoice.GainCard; } } else { if (HasExactlyOneAction(gameState)) { return PlayerActionChoice.TopDeck; } else if (ShouldGainCopper(gameState)) { return PlayerActionChoice.GainCard; } else { return PlayerActionChoice.Discard; } } }
/* public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard != Cards.Steward) return base.ChooseBetween(gameState, acceptableChoice); if (CountInHand(Cards.Estate, gameState) + CountInHand(Cards.Curse, gameState) + CountInHand(Cards.Copper, gameState) >= 2) return PlayerActionChoice.Trash; if (gameState.Self.AvailableActions > 0 && gameState.Self.CardsInDeck.Count + gameState.Self.Discard.Count >= 2) return PlayerActionChoice.PlusCard; else return PlayerActionChoice.PlusCoin; }*/ public override PlayerActionChoice ChooseBetween(GameState gameState, IsValidChoice acceptableChoice) { if (gameState.CurrentContext.CurrentCard != Cards.Steward) return base.ChooseBetween(gameState, acceptableChoice); if (CountInHand(Cards.Estate, gameState) + CountInHand(Cards.Curse, gameState) >= 2) return PlayerActionChoice.Trash; if (CountInHand(Cards.Copper, gameState) >= 2 && gameState.Self.ExpectedCoinValueAtEndOfTurn >= 7) return PlayerActionChoice.Trash; // if (CountAllOwned(Cards.Copper, gameState) >= 7) // return PlayerActionChoice.Trash; if (gameState.Self.AvailableActions > 0 && gameState.Self.CardsInDeck.Count + gameState.Self.Discard.Count >= 2) return PlayerActionChoice.PlusCard; else return PlayerActionChoice.PlusCoin; }