(self, mode='TEXT')
When called, renders the current state of the environment

        Args:
            mode (str):   Currently only "TEXT" is supported.
When called, renders the current state of the environment
When called renders the current state of the environment
def render(self, mode='TEXT'):
        """
        When called, renders the current state of the environment

        Args:
            mode (str):   Currently only "TEXT" is supported.

        """

        if mode.upper() == 'TEXT':
            print('\n\n')
            print('___________________________________',
                  (Poker.INT2STRING_ROUND[self.current_round] + " - " + str(
                      self.current_player.seat_id) + " acts").center(15),
                  '___________________________________')

            print("Board: ", self.cards2str(self.board))

            print(("Last Action:   player_" + str(self.last_action[2]) + ": " + str(self.last_action[0]) + " " +
                   str(self.last_action[1]).rjust(113)), "|   Main_pot: ", str(self.main_pot).rjust(7))

            # player information
            for p in self.seats:
                f = "-" if p.folded_this_episode else "+" if p.is_allin else ""
                print((f + "Player_" + str(p.seat_id) + ":").rjust(14) +
                      "stack: ", str(p.stack).rjust(8),
                      "current_bet: ", str(p.current_bet).rjust(8),
                      "side_pot_rank: ", str(p.side_pot_rank).rjust(8),
                      "hand: ", self.cards2str(p.hand).rjust(8),

                      # sidepots
                      " " * 18,
                      '|   Side_pot' + str(p.seat_id) + ": " + str(self.side_pots[p.seat_id]).rjust(6))

            if self.IS_FIXED_LIMIT_GAME:
                print("Num raises this round: ", self.n_raises_this_round)
            print("\n")

        else:
            raise ValueError(mode + "is unsupported")
def render ( self , mode = 'TEXT' ) : if mode . upper ( ) == 'TEXT' : print ( '\n\n' ) print ( '___________________________________' , ( Poker . INT2STRING_ROUND [ self . current_round ] + " - " + str ( self . current_player . seat_id ) + " acts" ) . center ( 15 ) , '___________________________________' ) print ( "Board: " , self . cards2str ( self . board ) ) print ( ( "Last Action:   player_" + str ( self . last_action [ 2 ] ) + ": " + str ( self . last_action [ 0 ] ) + " " + str ( self . last_action [ 1 ] ) . rjust ( 113 ) ) , "|   Main_pot: " , str ( self . main_pot ) . rjust ( 7 ) ) # player information for p in self . seats : f = "-" if p . folded_this_episode else "+" if p . is_allin else "" print ( ( f + "Player_" + str ( p . seat_id ) + ":" ) . rjust ( 14 ) + "stack: " , str ( p . stack ) . rjust ( 8 ) , "current_bet: " , str ( p . current_bet ) . rjust ( 8 ) , "side_pot_rank: " , str ( p . side_pot_rank ) . rjust ( 8 ) , "hand: " , self . cards2str ( p . hand ) . rjust ( 8 ) , # sidepots " " * 18 , '|   Side_pot' + str ( p . seat_id ) + ": " + str ( self . side_pots [ p . seat_id ] ) . rjust ( 6 ) ) if self . IS_FIXED_LIMIT_GAME : print ( "Num raises this round: " , self . n_raises_this_round ) print ( "\n" ) else : raise ValueError ( mode + "is unsupported" )