So, I'm new to code, but I gathered enough to program this *extremely* basic HT/Duke algorithm. It demolished Big Money - Embassy 60% to 40%; with the BM/E set to buy duchies at 6 provinces. However, I would like to do additional testing, like playing 2 HT/Duke algorithms vs. each other, or feat/duke vs ht/duke, etc. How do I program feast's gain ability?
{
name: 'HT/Duke'
requires: ['Duke', 'Horse Traders']
gainPriority: (state, my) -> [
"Duchy"
"Duke"
"Horse Traders" if my.countInDeck ("Horse Traders") <= 3
"Silver"
"Estate" if 0 < state.gainsToEndGame() <= 2
"Copper"
]
wantsToJM: (state, my) ->
#my.draw.length >= 3
true
skipPriority: (state, my) -> [
"Copper" if my.getTotalMoney() / my.numCardsInDeck() > 1
"Province" if my.countInDeck("Province") > my.countInDeck("Duchy") \
and my.countInDeck("Province") > my.countInDeck("Estate")
"Duchy" if my.countInDeck("Duchy") > my.countInDeck("Estate")
"Estate"
]
}