tlstyer/dominionstats — comment on commit 281b1ccc7bc191f8eaf3196b19bad0fe69289a03
File: optimal_card_ratios.py line 71
By rrenaud:

In general, I like to use the Game class in game.py rather than the raw document from mongo. It tends to be a bit friendlier than the raw documents. You can call game.GetPlayerDeck(name).TurnOrder(), for example, rather than building up the name to turn order dick. Likewise, you can get a game_state_iterator to iterate through the turns in order (and it handles possession and outpost correctly). On top of the client friendliness, it gives me a nice layer where I can change the game document format in the repository and then just worry about the one direct consumer, the Game class and it's related subclasses (PlayerDeck, PlayerDeckChange) and not have to worry about changing every analysis.