@@ -0,0 +1,2529 @@
+from HandRankings import hand_win_odds%0A%0Adef getaction(data_list, myHand, button):%0A    numBoardCards = int(data_list%5B2%5D)%0A    boardCards = %5B%5D #list of cards on board; len 0, 3, 4, 5%0A    for i in range(numBoardCards):%0A        boardCards.append(data_list%5B3 + i%5D)%0A%0A    index = 3 + numBoardCards%0A    numLastActions = int(data_list%5Bindex%5D)%0A    lastActions = %5B%5D #list of previous actions in this hand%0A    for i in range(numLastActions):%0A        lastActions.append(data_list%5Bindex + 1 + i%5D)%0A%0A    index2 = index + 1 + numLastActions%0A    numMoves = int(data_list%5Bindex2%5D)%0A    moves = %5B%5D #list of legal moves%0A    for i in range(numMoves):%0A        moves.append(data_list%5Bindex2 + 1 + i%5D)%0A%0A    #if button is True, you are dealer --%3E you act first pre-flop, then act second%0A%0A    #pre-flop%0A    odds = hand_win_odds(myHand)%0A    aggressive = False%0A    if odds %3E 0.55:     #Decided this value after playing around with 0.50, 0.53, 0.55, 0.57, 0.60, 0.70%0A        aggressive = True%0A    betBool = False     #is Bet a legal move?%0A    raiseBool = False   #is Raise a legal move?%0A    hasBetRaise = False #have I already bet or raised?%0A%0A    if aggressive:%0A        for move in moves:%0A            if %22BET%22 in move:%0A                betBool = True%0A                raiseBool = False%0A%0A                colIndex = move.index(%22:%22)  # Parses the min and max bet%0A                firstSlice = move%5BcolIndex + 1:%5D%0A                colIndex2 = firstSlice.index(%22:%22)%0A                minBet = int(firstSlice%5B:colIndex2%5D) #int(move%5BcolIndex + 1:colIndex2%5D)%0A                maxBet = int(firstSlice%5BcolIndex2 + 1:%5D) #int(move%5BcolIndex2 + 1:%5D)%0A            elif %22RAISE%22 in move:%0A                betBool = False%0A                raiseBool = True%0A%0A                colIndex = move.index(%22:%22)  # Parses the min and max bet%0A                firstSlice = move%5BcolIndex + 1:%5D%0A                colIndex2 = firstSlice.index(%22:%22)%0A                minRaise = int(firstSlice%5B:colIndex2%5D) #int(move%5BcolIndex + 1:colIndex2%5D)%0A                maxRaise = int(firstSlice%5BcolIndex2 + 1:%5D) #int(move%5BcolIndex2 + 1:%5D)%0A        if betBool and not hasBetRaise:%0A            return %22BET:%22 + str(odds*(minBet + maxBet)/2) #arbitrarily set to bet odds * average of min/max bets%0A        elif raiseBool and not hasBetRaise:%0A            return %22RAISE:%22 + str(odds * (minRaise + maxRaise) / 2)  # arbitrarily set to raise odds * average of min/max bets%0A        else:%0A            return %22CALL%22%0A    else:%0A        for move in moves:%0A            if %22CALL%22 in move:%0A                return %22CALL%22%0A        return %22CHECK%22

Add PreflopLogic.py via Upload