Question: python -The solitaire goes up when you have used up the deck. If you have no places you can legally lay, the solitaire card does
python -The solitaire goes up when you have used up the deck. If you have no places you can legally lay, the solitaire card does not go up.
Import class 1. Create a class for the game itself. This class should have instance variables for the deck and the 9 slots. 2.The designer of the game class must make a new deck, make the 9 slots, draw cards from the deck and place them on the 9 slots 3. Create a method write_condition that prints what is in the 9 slots and how many cards are left in the deck. 4. Create a method that checks if the game is finished. It must return True if the deck is empty and False otherwise 5 Create a method for placing 2 cards. The method should take the numbers of the 2 places as parameters. The method should check that this is a legal location. If it is a legal placement, the method must draw 2 new cards from the deck and place them on the 2 slots. 6. Create a method for placing 3 cards similar to the 1 for 2 cards 7. Create code that allows the user to play the solitaire card. This can either be a method in the game class or part of the if__name__ == __main__ block. The solitaire card must end when the deck is empty with a message that the solitaire card has gone up.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
