This program simulates the classic card game War. It's designed to practice using stacks in C++.
In this project, 100 cards will be shuffled and randomly split between two players. Each player's cards will be stored in a stack. The game continues until one player runs out of cards, and a clear winner is determined.
- C++ compiler
- Make
- CxxTest (for running tests)
To install the requirements on Debian based systems, use the following commands:
sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install cxxtestFirst, clone the repository:
git clone https://github.com/Matth-L/data-struct-compendium.git
cd stackTo build and run the game, use the following commands:
make
./war_gameWe created tests to check the stack implementation. To run the tests, use:
./test_pileTo clean up the build files, use:
make clean