Cache the 52 possible results of createCardMask.

21% speedup on my machine.