Skip to content

Instantly share code, notes, and snippets.

@rspeer
Created October 17, 2011 07:29
Show Gist options
  • Save rspeer/1292128 to your computer and use it in GitHub Desktop.
Save rspeer/1292128 to your computer and use it in GitHub Desktop.
Dominiate test: Big Money
# This is an implementation of the pure Big Money strategy, updated
# based on WanderingWinder's forum posts:
# http://forum.dominionstrategy.com/index.php?topic=625
{
name: 'Big Money'
author: 'WanderingWinder'
gainPriority: (state, my) ->
if state.supply.Colony?
[
"Colony" if my.getTotalMoney() > 32
"Province" if state.gainsToEndGame() <= 6
"Duchy" if state.gainsToEndGame() <= 5
"Estate" if state.gainsToEndGame() <= 2
"Platinum"
"Province" if state.countInSupply("Colony") <= 7
"Gold"
"Duchy" if state.gainsToEndGame() <= 6
"Silver"
"Copper" if state.gainsToEndGame() <= 2
]
else
[
"Province" if my.getTotalMoney() > 18
"Duchy" if state.gainsToEndGame() <= 4
"Estate" if state.gainsToEndGame() <= 2
"Gold"
"Duchy" if state.gainsToEndGame() <= 6
"Silver"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment