Question: In PYTHON 3 program a card game with the following information: Create a card class that contains a symbol (hearts, spades, diamonds, clover) and a

In PYTHON 3 program a card game with the following information:  Create a card class that contains a symbol (hearts, spades, diamonds, clover) and a value (1-13).  Create a "player" class, with the methods and attributes that you consider necessary. Each player must have a group of cards in hand.  Create a class "pile_cartas" that stacks the cards one below the other, but only allows stack in two cases: (i) if they are of an immediately lower number and of a different shape (ii) if they are of the same figure. If you try to stack a wrong card, you must throw an exception.  Add the __str__ method to the class "pile_cartas", to print the letters that have been stacked Until now.  Simulate a card game, where players can be added and where players are dealt a group of letters. Each turn a player must put a card on the pile, the player who run out of cards.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!