code: function (card) {
  	if (typeof card == 'number')
  		return card >= 1 && card <= deckSize ? card : undefined; // Already codified
  	if (typeof card != 'string' || card.length != 2)
  		return undefined; // Invalid input
  	var posRank = abbr[card[0]];
  	var posSuit = (abbr[card[1]] - ranks.length) >> 1;
  	if (typeof posRank != 'number' || posRank >= ranks.length || posSuit < 0)
  		return undefined; // Invalid characters
  	return posRank * suits.length + posSuit + 1;
  }
docs: ## Internal Functions Parses the formatted card to get its numeric code.