Open kingcons opened 8 years ago
Jen is helping out.
(See the graphs here: http://deckbox.org/sets/1392609 and sample hand functionality here: http://deckbox.org/sets/1392609/tools for an idea of what kind of data these methods should return.)
Note that these are just methods on the model! No view or controller level work needed for this ticket. :)
Add the following the methods to the deck model:
sample_hand
that returns an array of 7 cards picked at random from the deck.mana_curve
that returns a hash where the key is the converted_mana_cost and the value is the number of cards in the deck with that cost.card_type_curve
that return a hash where the key is the card_type and the value is the number of cards in the deck with that card typeTesting for this will have be done by adding cards to a deck manually which is very easy now that the data model with
rails c
. For example,