Dominion > Simulation

Dominiate: a Dominion simulator that runs on the Web

<< < (2/63) > >>

Davio:
IT professional here and yeah, making documentation is the equivalent of cleaning the coal containers on an ocean liner, one of the "less" fun tasks.

However, often there are moments you'd wish you've written some documentation, I have seen some forgotten software projects come back to life, because of a sudden interest from a client.


I like the clean CoffeeCode, haven't used it myself and how you deal with the governing 'state'. When I dabbled in Dominion simulation, I've often wondered where I should put stuff like Bridge's special action.

rspeer:
HOLY HELL, IT RUNS ON MY PHONE.

Is it the future now? Because my phone just played a thousand or so games of Dominion against itself. (In the process it got rather warm and used about 8% of the battery. And the strategy editors were of course quite unusable.)

Tydude:
Is it just my code, or does it not work if you don't include Colony and Platinum? For example, I just set up a simple code for Big Money+Smithy.
--- Code: ---{
  name: 'BigMoneyU'
  gainPriority: (state) -> [
    "Colony" if state.current.countInDeck("Platinum") > 0
    "Province" if state.countInSupply("Colony") <= 6 \
               or state.countInSupply("Province") <= 6
   
    "Duchy" if 0 < state.gainsToEndGame() <= 5
    "Estate" if 0 < state.gainsToEndGame() <= 2
    "Platinum"
    "Gold"
    "Smithy" if state.current.countInDeck("Smithy")<1
    "Silver"
    "Copper" if state.gainsToEndGame() <= 3
  ]
}
--- End code ---

Right? If I run it with Colonies, it works as expected (buys a single Smithy and then BM from there on out). With no Colonies, it seems to completely skip buying the Smithy.

rspeer:

--- Quote from: Tydude on September 11, 2011, 04:16:18 pm ---Is it just my code, or does it not work if you don't include Colony and Platinum? For example, I just set up a simple code for Big Money+Smithy.
--- Code: ---{
  name: 'BigMoneyU'
  gainPriority: (state) -> [
    "Colony" if state.current.countInDeck("Platinum") > 0
    "Province" if state.countInSupply("Colony") <= 6 \
               or state.countInSupply("Province") <= 6
   
    "Duchy" if 0 < state.gainsToEndGame() <= 5
    "Estate" if 0 < state.gainsToEndGame() <= 2
    "Platinum"
    "Gold"
    "Smithy" if state.current.countInDeck("Smithy")<1
    "Silver"
    "Copper" if state.gainsToEndGame() <= 3
  ]
}
--- End code ---

Right? If I run it with Colonies, it works as expected (buys a single Smithy and then BM from there on out). With no Colonies, it seems to completely skip buying the Smithy.

--- End quote ---

Oh man. The supply was pretty messed up if that box was unchecked. Thanks for finding the bug, and I've fixed it now.

Incidentally, I added the rule to buy a second Smithy once there are 16 cards in the deck, and put it up as a selectable strategy called "BigSmithy".

Matt_Arnold:
Awesome. Fantastic. I have forked and will submit my proposed file change soon.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version