A Simple HearthStone Battleground clone to demonstrate OOP concepts
The goal of this project was to try learn basic of design pattern for OOP using C++.
- Uses of smart pointers : Better aggregation and composition relationship than with raw pointers.
- Abstract classes : Polymorphism, Interfaces, Generics.
- Factory pattern : Create cards in a flexible and modular way.
Turn based game consisting of two phases : recruitement and battle.
The game end when one of the player has lost all of his HP.
- RECRUITEMENT : Player can choose betwen 4 actions : buy, sell, play a card, start battle.
- BATTLE : First player with most cards start the attack, minions attacking goes from left to right order and target a random enemy.
- BATTLECRY : Activate when card is played.
- TAUNT : Force the card to be attacked by the opponent. Activate on damage.
git clone https://github.com/An0n1mity/Hearthstone-Battleground-Clone
g++ -o hearthstone-battle-ground-cli *.c++ (Linux)
x86_64-w64-mingw32-g++-posix -o hearthstone-battle-ground-cli -std=c++2a -lwinpthread *.cpp (Windows)
./hearthstone-battle-ground-cli
( An executable was already compiled for windows with mingw, you need to launch it from a terminal )