rspeer / dominiate

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

More robust endgame condition #80

Closed pauljarc closed 10 years ago

pauljarc commented 10 years ago

This endgame condition works even with AIs that stop buying cards. This can happen when the AI faces a situation that the author didn't foresee, or when it's based on Monument and doesn't need to buy cards to score points.

rspeer commented 10 years ago

Good idea, and thanks for the pull!

Give me some time before I make this go live; I'm figuring out what to do with AI's huge pull request.

rspeer commented 10 years ago

Hm. Although this worked in my node.js testing environment, it didn't work on the Web. It would crash when trying to check totalSupplyCards, which for some reason was undefined the second time it ran a game.

So, I had to revert this commit. If you can figure it out, feel free to make a pull request that re-reverts.

pauljarc commented 10 years ago

Could that have been due to an old Javascript file in your browser cache? Could you try clearing your cache and restarting your browser?