An Efficient Way to "Assign Type" To Objects

Ah, this is rather useful. Surely not for this case, but I’d probably need something like this in some other card games.
I appreciate it.