(self)
Btn has index 0. He is always the last with the exception of some HU rules where ""BTN_IS_FIRST_POSTFLOP"" can
        be set to True. In multi-agent games, we search for the smalles seat id in the list, while 0 (i.e. btn) is
        treated as inf.
Btn has index 0. He is always the last with the exception of some HU rules where ""BTN_IS_FIRST_POSTFLOP"" can
        be set to True. In multi-agent games, we search for the smalles seat id in the list, while 0 (i.e. btn) is
        treated as inf.
Btn has index 0 . He is always the last with the exception of some HU rules where BTN_IS_FIRST_POSTFLOP can be set to True . In multi - agent games we search for the smalles seat id in the list while 0 ( i . e . btn ) is treated as inf .
def _get_first_to_act_post_flop(self):
        """
        Btn has index 0. He is always the last with the exception of some HU rules where ""BTN_IS_FIRST_POSTFLOP"" can
        be set to True. In multi-agent games, we search for the smalles seat id in the list, while 0 (i.e. btn) is
        treated as inf.
        """

        if self.N_SEATS == 2:
            if self.BTN_IS_FIRST_POSTFLOP:
                return self.seats[0]
            else:
                return self.seats[1]
        else:
            players_to_consider = [p for p in self.seats if not p.folded_this_episode and not p.is_allin]

            # since there will always be at least 2 ppl in the pot, the btn can NEVER be the first!
            first_p = players_to_consider[0]
            for p in players_to_consider:
                if p.seat_id < first_p.seat_id or first_p.seat_id == 0:
                    first_p = p

            return first_p
def _get_first_to_act_post_flop ( self ) : if self . N_SEATS == 2 : if self . BTN_IS_FIRST_POSTFLOP : return self . seats [ 0 ] else : return self . seats [ 1 ] else : players_to_consider = [ p for p in self . seats if not p . folded_this_episode and not p . is_allin ] # since there will always be at least 2 ppl in the pot, the btn can NEVER be the first! first_p = players_to_consider [ 0 ] for p in players_to_consider : if p . seat_id < first_p . seat_id or first_p . seat_id == 0 : first_p = p return first_p