This project is a partial implementation of a Solitaire game in C++. The implementation includes:
- A
Cardclass that represents individual playing cards. - A
Deckclass for creating, shuffling, and dealing cards. - War Game Mode (
war_game.cpp) 🎮 (Players compete by drawing cards in rounds) - Interactive Mode (
main.cpp) 🃏 (Allows drawing, shuffling, and showing hand) - Deck & Hand Management 🂡 (Supports shuffling, drawing, and hand display)
- A
main.cppfile to test basic functionality. - A
test_card.cppfile for unit testing theCardclass. - UML Diagrams explaining the software design.
This implementation is built for a GNU/Linux environment but also works on Windows (MinGW) and VS Code.
solitaire_project/
├── src/ # Source files
│ ├── card.h # Card class header file
│ ├── card.cpp # Card class implementation
│ ├── deck.h # Deck class header file
│ ├── deck.cpp # Deck class implementation
│ ├── hand.h # Hand class Header File
│ ├── hand.cpp # Hand class implementation
│ ├── main.cpp # Main program
│ ├── test_card.cpp # Unit test for Card class
│
├── diagrams/ # UML Diagrams
│ ├── class_diagram.png
│ ├── use_case_diagram.png
│ ├── sequence_diagram.png
│ ├── activity_diagram.png
│
├── README.md # Project documentation (this file)
├── LICENSE # MIT/GPL License
└── Solitaire Game Documentation.pdf # Detailed documentation
This project includes the following UML Diagrams:
This diagram shows the structure of the game classes and their relationships.

Illustrates how the player interacts with the system.

Represents the flow of function calls when the game starts.

Shows the decision flow for game logic.

For Linux/macOS:
cd src
g++ card.cpp deck.cpp main.cpp -o solitaire
./solitaireFor Windows:
cd src
g++ card.cpp deck.cpp main.cpp -o solitaire.exe
./solitaire.exe