architecture for card drawing algorithm