rspeer / dominiate

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

Don't buy anything if that causes you to lose #70

Closed DStu-dominion closed 12 years ago

DStu-dominion commented 12 years ago

I still don't have gotten this git-thing correctly. The last 3 commits are about the "don't buy anything if it kills you"-condition. The first commit from 2011/12/8 is non-sense and about something else, I don't know how I undo it here. Afais the "don't kill yourself" works correctly. It's directly hard-coded in the game-mechanic, so not implemented in the AI. Every buy that will let the AI lose is not proposed to the AI, so it can not chose something that will kill it. It looks forward through the whole buy-phase, so if you win with say Province+Duchy, but will lose with Province or Duchy, it can buy them both and win. Geronimoo's simulator didn't do this the last time I tested ;) The problem with this is that at the moment, this only cares for the buyphase, so you can still lose by workshopping the wrong card.