Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solitaire Game (Partial Implementation)

📌 Description

This project is a partial implementation of a Solitaire game in C++. The implementation includes:

  • A Card class that represents individual playing cards.
  • A Deck class 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.cpp file to test basic functionality.
  • A test_card.cpp file for unit testing the Card class.
  • UML Diagrams explaining the software design.

This implementation is built for a GNU/Linux environment but also works on Windows (MinGW) and VS Code.


📂 Project Structure

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

📌 UML Diagrams

This project includes the following UML Diagrams:

1️⃣ Class Diagram

This diagram shows the structure of the game classes and their relationships. Class Diagram Class Diagram

2️⃣ Use Case Diagram

Illustrates how the player interacts with the system. Use Case Diagram

3️⃣ Sequence Diagram

Represents the flow of function calls when the game starts. Sequence Diagram

4️⃣ Activity Diagram

Shows the decision flow for game logic. Activity Diagram


⚙️ Build & Run Instructions

✅ Compile and Run Main Program

For Linux/macOS:

cd src
g++ card.cpp deck.cpp main.cpp -o solitaire
./solitaire

For Windows:

cd src
g++ card.cpp deck.cpp main.cpp -o solitaire.exe
./solitaire.exe

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages