Problem: For this assignment, you’ll be implementing a simple, console based card game
(similar to Hearthstone). The solution should be fully functional with no bugs.
Context:
94 Common cards (74%) -- C1, C2, C3, ... C94
81 Rare cards (21%) -- R1, R2, R3, ... R81
37 Epic card (4%) -- E1, E2, E3, ... E37
33 Legendary cards (1%) -- L1, L2, L3, ... L33
In this game, you have 4 different types of cards: Common, Rare, Epic, and Legendary. Each of
these types of cards have a different probability of being selected in a pack of cards (5 cards).
For example, a Common card is 74% likely to be chosen if you randomly selected from all the
cards. Within these Common cards, it is equally likely that any of the 94 random cards are
chosen.
Goals:
1.) Simulate opening a pack (5 cards) and print out a sensible result to visualize the
cards in the pack.
a.) Think of this as every single card “draw” you make should generate a random
card according to the probabilities given above. For example, every card draw
has a 74% chance of being common, 21% rare, 4% epic, and 1% legendary.
Once you have determined the type, it is equally likely that any of the card
numbers are chosen. Your code should be kind of a “two step” process in the
sense that first you need to figure out which type of card you selected, and then
which specific card number.
2.) Create an autoplay method that prints out the number of packs it needs to open to
collect every single card (Bonus)
a.) You should have a method that when run will keep calling your open pack
method until every single card is chosen. This doesn’t mean just 1 common, 1
rare, 1 epic, and 1 legendary. This means every common card (C1 ... C94),
every rare card (R1 ... R81), etc. This is for a total of 94+81+37+33 = 245 cards.