Writing the Logic for CardMathingGame class