Implementation of CardMatchingGame.