Question: http://www.cse.msu.edu/~cse231/Online/Labs/Lab11/lab11b.py ======> lab11b.py Part B: Programming with the Class Methods Consider the program in the file named labl lb.py, which imports the module containing the


http://www.cse.msu.edu/~cse231/Online/Labs/Lab11/lab11b.py ======> lab11b.py
Part B: Programming with the Class Methods Consider the program in the file named "labl lb.py", which imports the module containing the Card and Deck classes. Extend that program to play the card game named "War". Note: you may not modify the contents of cards py" (the Card and Deck classes). Game Rules (Simple Version) War is a two-player game which uses a standard deck of 52 cards. Suits are ignored in the game, and the cards are ordered as follows: Ace King Queen Jack 10 9 8 7 6 5 4 3 2 (Aces are the highest cards). The cards are distributed to the two players one at a time (alternating, until both players have a stack of 26 cards. Each player turns over the top card on his stack (a battle). Whoever played the card with the highest rank wins the battle and adds both cards to the bottom of his stack. In the simple version, if both cards have the same rank, each player simply returns his card to the bottom of his own stack (the battle was a stalemate). Play continues until one player has all 52 cards in his stack and wins the game
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
