Open amalloy opened 10 years ago
Perfect, this is what I was thinking too. If you send over a pull request I'll merge it in.
I've implemented this in https://github.com/amalloy/dominion/compare/master...library - it's in a separate branch because I don't want to suggest you pull it until it's possible to test it.
You should be able to test this now.
I noticed https://github.com/egonSchiele/dominion/blob/2f4ff82040f075b9370fd2b38720b0502a2771b7/src/Dominion/Internal.hs#L425 - I think you want LibraryEffect to take a function like
This isn't quite all the information available (eg, how many cards are left before my shuffle?), so maybe it needs to be lifted into State somehow, but I think it's close enough. If you agree, I think it's within my ability to make that change.