playing card logic