This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from math import factorial, log | |
# specific to "normal" cards: this method needs to be rewritten for different decks | |
def card_to_int(s): | |
val = "A23456789TJQK".index(s[0]) | |
suit = "CDHS".index(s[1]) | |
return 4*val + suit | |
def main(): |