This game is based on War (card game). It is a multiplayer game in reality. Here it is limited to two, one is Computer and the other is you. Rules implemented currently:
- The cards are shuffled and equally divided among players(26 cards each)
- The card are taken from back, that is from top of a deck of upside down cards
- The card with higher number(rank) of any suite(clubs(C)(♣), diamonds(D)(♦), hearts(H)(♥), and spades(S)) will win For eg: The player played H10 card will win over a player who put D9 Order is 2 3 4 5 6 7 8 9 10 J Q K A, Higher will be the winner
- If the cards are of same rank, then it is called a War, each player has to put 3 cards each upside down and then a card is taken and put upright, the player who put higher value will get all the cards (1+3+1)=>5 cards from the other player, totally 10 cards. If the value is same the process is repeated till the cards are over or one get a different value card.
- The player who loses all cards will lose the game
This is an assignment from this course https://www.udemy.com/course/python-and-django-full-stack-web-developer-bootcamp. Code is inspired from his work, I have tried to correct few issues/errors that were happening in Jose's code.