I guess you means something like Balatro? I've no experience with making such games, so it's not something I would attempt to write a tutorial for. I think the biggest challenge would be implementing the rules (of which there could be dozens). Also, one would need to teach the AI such rules, and ensure it was able to play fairly. Not a simple game to make, unfortunately!