The PLT Card Game API PLT has a very neat API for writing card games. Here are some examples of what you can do with it: