Currently all of the code, except for unit tests, is found inside main.py until a complete refactor which is planned in the very near future.
Hearthstone game loop state logic found in main.py, along with Player, Minion, Weapon and Card classes which encapsulate all data needed to reproduce a 1-to-1 state as that of the collectible card-game (CCG) Hearthstone. Run main.py to start the CLI:
python3 main.py
Card effects are created with the command design pattern and instantiated with a card factory for every unique instance that exists.
Unit tests written for the Player class. Tests are currently very fast (0.000s avg over 10 iterations). Run the tests with:
python3 tests.py
Player options appear as 0-indexed numbers which are sorted in the CLI. If you want to play an action input the corresponding number and click enter on the keyboard. If prompted again, e.g. to choose a target, input a number and click enter. When the player is done with his turn, he can click enter with no prior input to end his turn.
Just like in Hearthstone, the positioning of your minions is a key game mechanic to be aware of and play around. Due to that, minion positioning works the same way as it does in hearthstone. If there are no minions on player's board, the minion will be placed in the center. Otherwise, the player can choose to play a minion on the left or the right of any existing minion on the board.