Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Function to convert an int representing 2 holdem hole cards (as created by twoStartCards)
into a string like AQo 

        def twoStartCardString(card):
    """ Function to convert an int representing 2 holdem hole cards (as created by twoStartCards)
        into a string like AQo """
    ret = 'xx'
    if card > 0 and card < 170:
        s = ('2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A')
        x = (card-1) / 13
        y = (card-1) - 13 * x
        if x == y:  ret = s[x] + s[y]
        elif x > y: ret = s[x] + s[y] + 's'
        else:       ret = s[y] + s[x] + 'o'
    #print "twoStartCardString(", card ,") = " + ret
    return ret
        


src/f/p/fpdb-chaz-HEAD/pyfpdb/GuiHandViewer.py   fpdb-chaz(Download)
        value2 = Card.card_map[hcs[1][0]]
        idx = Card.twoStartCards(value1, hcs[0][1], value2, hcs[1][1])
        abbr = Card.twoStartCardString(idx)
        return False if card_filter[abbr] == False else True
 

src/f/p/fpdb-sql-HEAD/pyfpdb/GuiRingPlayerStats.py   fpdb-sql(Download)
                    if column[colalias] == 'game':
                        if holecards:
                            value = Card.twoStartCardString( result[sqlrow][hgametypeid_idx] )
                        else:
                            minbb = result[sqlrow][colnames.index('minbigblind')]