bilts/dominiate — pull request #1 by bilts (2012-01-11 07:10:30+00:00)
Title: Implement Scheme

I implemented Scheme. I've included a sample Scheme-Witch strategy that's competitive with Double Witch.

In the process, I found an issue with the card clean-up code. Card#onCleanup was being called after the card was removed from play, and possibly after other cards had been removed from play. The problem is that some cards being cleaned up need to consider other cards that have been played. In the case of Scheme, it needs to consider itself as well. In theory, this could cause problems with Herbalist, too. I think Herbalist works coincidentally because, with the exception of Black Market, treasure is always played after actions.

I updated the cleanup code so that onCleanup is called first, then cards are removed from play. I didn't see any problems with existing cards, but I'd appreciate someone more familiar with the code taking a look at it.