Refactor common game code from "SetCardGame" and "CardMatchingGame" to a base class "CardGame."