Skip to content

Implement Scheme #60

Merged
merged 1 commit into from Jan 20, 2012

2 participants

@bilts
bilts commented Jan 11, 2012

Fixes #37. 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.

@rspeer rspeer merged commit 423e217 into rspeer:master Jan 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.