A console-based recreation of the Gwent minigame from The Witcher 3 written in C.
- Four playable factions
- AI opponent
- Hero, Spy, Medic, Muster, Tight Bond, Morale Boost, Commander's Horn
- Weather effects
- Leader abilities
- Three-round gameplay
- Dynamic memory management
gcc -Wall -g -o gwent *.c
As you may realize going through the card and deck making process, the original architecture I started the program with became a bit more difficult than I had originally intended. I now know I should have created every card at the start of the game rather than a simple 10 card deck, then keep reallocating memory for it, because then I wouldnt have had to force the muster mechanic. I also should have used a text, CSV, or JSON-style data file in order to create/handle card creation rather than creating many different functions for each card, but at the beginning of this project, I had no idea what a CSV or JSON file were. In a second version, I would model the draw pile, hand, battlefield, and discard pile as distinct card containers and load card definitions from external data.
This project was written to practice C programming, pointers, dynamic memory allocation, and managing interacting game systems.