/war

The war card game written in Python

Primary LanguagePython

Card Game Project

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.

Project Structure

The project is divided into four main Python files:

  1. card.py: This file defines the Card 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.

  2. deck.py: This file defines the Deck class, which represents a deck of cards. It includes methods for shuffling the deck and dealing a card.

  3. player.py: This file defines the Player 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.

  4. main.py: This file contains the main game logic for the card game.

How to Run

To run the game, simply execute the main.py file:

python main.py