Wagic, the Homebrew is a C++ game engine that allows to play card games against an AI on:
It is highly customizable and allows the player to tweak the rules, create their own cards, their own themes, etc...
Info, downloads, discussions and more at http://wololo.net/forum/index.php (archived as of 16 Nov 2022).
Chat with the community on the Wagic - MTG Game Discord (Feb 2023).
Developer information from the Wagic Wiki is also included in the wagic/docs/ folder.
Wagic, The Homebrew sample playthrough on YouTube by Rolz73, 6 Feb 2014