Can you copyright the game mechanics? I don’t see how eg words with friends could have ever existed if so.
In that Set C&D, the infringing implementation is using art assets from the copyrighted Set game. Presumably, a version with different colors/shapes/etc (and a different name, so as to also avoid trademark infringement) would be totally fine.