Pawn

Another example of a card that does very little, but is hell to implement properly

When played evaluate in this order:

  • if player has more action cards in hand and no more actions left, +1 action will be chosen.
  • If player can buy a better card by adding $1, +$1 will be chosen
  • If player has more choices left and deck size is greater than 0, +1 card will be chosen
  • If player has more choices left +1 buy will be chosen
  • If player has more choices left and +$1 is not yet chosen, +$1 will be chosen
  • If player has more choices left and +1 action is not yet chosen, +1 action will be chosen
  1. Anonymous
    July 28, 2019 at 10:05 am

    Hi Geronimoo,

    I would like to change the card’s logic of this card for a specific game strategy that I would like to test (basically, use Pawn as a + buy card). Can I somehow change this for the strategy only?

    For example, it would already help if I could disable rule 2 and 3.

    if player has more action cards in hand and no more actions left, +1 action will be chosen.
    remove – If player can buy a better card by adding $1, +$1 will be chosen
    remove – If player has more choices left and deck size is greater than 0, +1 card will be chosen
    If player has more choices left +1 buy will be chosen
    If player has more choices left ( obsolete and +$1 is not yet chosen), +$1 will be chosen
    obsolete – If player has more choices left and +1 action is not yet chosen, +1 action will be chosen

  2. July 29, 2019 at 11:00 am

    You can implement a new PlayStrategy. Simply add a new enum value for DomPlayStrategy. Then go to the DomCardName class and in the getPlayStrategies()-method add a case for Pawn. Then you can change Pawn’s code depending on the getPlayStrategy (see Native Village for an example). When constructing the bot in the client you can specify the playStrategy in the Editor window for the buy rules. Hope this helps!

  3. Gunter Goossens
    July 29, 2019 at 1:36 pm

    Thanks for the reply! Do I need developer mode for this, or something like that? As far as I can see, I can’t find any place where I can make changes to the classes.

  1. No trackbacks yet.

Leave a comment