Refactored the playing card game.