Changeset 9 for hand.py

Show
Ignore:
Timestamp:
02/03/08 10:09:51 (4 years ago)
Author:
mike
Message:

Added deferreds

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • hand.py

    r6 r9  
    11import deck 
    22 
    3 hand_orders = [ "high_card", 
     3HAND_ORDERS = [ "high_card", 
    44                "pair", 
    55                "two_pair", 
     
    1616    if not ret: ret = is_n_kinds([a for (a,b) in cards]) 
    1717    #replace the text with a value 
    18     return (hand_orders.index(ret[0]), ret[1]) 
     18    return (HAND_ORDERS.index(ret[0]), ret[1]) 
    1919 
    2020 
     
    9595            for cc in combNoReplace(cards[i+1:],n-1): 
    9696                #Aces can have 2 values 
    97                 if cards[i]==deck.cards.index("A"): yield [-1]+cc 
     97                if cards[i]==deck.CARDS.index("A"): yield [-1]+cc 
    9898                yield [cards[i]]+cc 
    9999