(self)
Taking the highest and 2nd highest and subtracting them gives us the minraise amount. If all bets are equal,
        we return with a delta of 1 big blind.
Taking the highest and 2nd highest and subtracting them gives us the minraise amount. If all bets are equal,
        we return with a delta of 1 big blind.
Taking the highest and 2nd highest and subtracting them gives us the minraise amount . If all bets are equal we return with a delta of 1 big blind .
def _get_current_total_min_raise(self):
        """
        Taking the highest and 2nd highest and subtracting them gives us the minraise amount. If all bets are equal,
        we return with a delta of 1 big blind.
        """

        if self.N_SEATS == 2:
            _sorted_ascending = sorted([p.current_bet for p in self.seats])  # 0 is small, 1 is big
            delta = max(_sorted_ascending[1] - _sorted_ascending[0], self.BIG_BLIND)
            return _sorted_ascending[1] + delta

        else:
            current_bets_sorted_descending = sorted([p.current_bet for p in self.seats], reverse=True)
            current_to_call_total = max(current_bets_sorted_descending)
            _largest_bet = current_bets_sorted_descending[0]

            for i in range(1, self.N_SEATS):
                if current_bets_sorted_descending[i] == _largest_bet:
                    continue

                delta_between_last_and_before_last = _largest_bet - current_bets_sorted_descending[i]

                delta = max(delta_between_last_and_before_last, self.BIG_BLIND)
                return current_to_call_total + delta

            # in cases where all bets are equal, the minraise delta is 1 big blind
            return current_to_call_total + self.BIG_BLIND
def _get_current_total_min_raise ( self ) : if self . N_SEATS == 2 : _sorted_ascending = sorted ( [ p . current_bet for p in self . seats ] ) # 0 is small, 1 is big delta = max ( _sorted_ascending [ 1 ] - _sorted_ascending [ 0 ] , self . BIG_BLIND ) return _sorted_ascending [ 1 ] + delta else : current_bets_sorted_descending = sorted ( [ p . current_bet for p in self . seats ] , reverse = True ) current_to_call_total = max ( current_bets_sorted_descending ) _largest_bet = current_bets_sorted_descending [ 0 ] for i in range ( 1 , self . N_SEATS ) : if current_bets_sorted_descending [ i ] == _largest_bet : continue delta_between_last_and_before_last = _largest_bet - current_bets_sorted_descending [ i ] delta = max ( delta_between_last_and_before_last , self . BIG_BLIND ) return current_to_call_total + delta # in cases where all bets are equal, the minraise delta is 1 big blind return current_to_call_total + self . BIG_BLIND