craigtheegg/deckbuilder — pull request #5 by kevlar1818 (2012-06-12 15:54:52+00:00)
Title: Added "ANY" functionality to cmd_prob(), added two deck analysis commands

The `ANY ` functionality has been implemented. Overlapping types are not handled yet, so:

prob 1 ANY creature AND 2 ANY artifact creature

will not give correct probabilities, as you mentioned to me. I left commented `print` lines in my code in case you wanted to debug it.

I also added two other user commands:
- **cdist** - displays *card* color distribution in the active deck.
- **csdist** - displays color *symbol* distribution in the active deck.

Not sure if these are the best names for the commands, and I might make them part of a larger function that shows a bunch of deck analysis. For now, however, I figure they are good enough to be standalone commands. Of course feel free to change anything about them (their name or output formatting, etc).

Finally I added a helper command in `deck.py` called `listType()`. It is used in the `ANY` functionality. It "lists" rather than "counts" because I plan on using it in later analysis commands.