rspeer / dominiate

A simulator for Dominion card game strategies
http://rspeer.github.com/dominiate
MIT License
121 stars 43 forks source link

Fix Courtyard's choice of card to put back on deck #63

Closed bilts closed 12 years ago

bilts commented 12 years ago

There were two problems. First, coinLossMargin was using State#coins rather than PlayerState#coins. The former is undefined, so coinLossMargin was incorrectly returning 0. Second, the treasure sorting in putOnDeckPriority was reversed, so the AI would put back the lowest valued treasure it could, rather than the highest.

These are now fixed. Fixes #53.