This project is a simple implementation of a card game using Python. The game is a simulation of a war card game between two players.
The project is divided into four main Python files:
-
card.py
: This file defines theCard
class, which represents a single card with a rank, suit, and value. It also defines the suits and ranks used in a deck of cards. -
deck.py
: This file defines theDeck
class, which represents a deck of cards. It includes methods for shuffling the deck and dealing a card. -
player.py
: This file defines thePlayer
class, which represents a player in the card game. It includes methods for removing a card from the player's hand and adding one or more cards to the player's hand. -
main.py
: This file contains the main game logic for the card game.
To run the game, simply execute the main.py
file:
python main.py