game.py
def draw_text(self):
        """
        Draws the text on the screen
        """
        # active player text
        status_text = f"It's {self.board.active_player.color_name}'s turn"
        player_1_active = self.board.player_1_is_active()
        status_color = self.PLAYER_1_COLOR if player_1_active else self.PLAYER_2_COLOR

        # value text
        value = self.board.heuristic_value()
        # print game end state if game is over
        status = self.board.status()
        value_text = f"Value: {value}"
        if status != Status.ONGOING:
            # display winner
            status_text = status.value
            # display winner color
            player_1_won = status == Status.PLAYER_1_WINS
            status_color = self.PLAYER_1_COLOR if player_1_won else self.PLAYER_2_COLOR
        elif value != 0:
            winning_player_index = 1 - int(value > 0)
            winning_player = self.board.players[winning_player_index]
            value_text += f"  |  {winning_player.color_name} is winning"

        # draw status text
        status_text_render = self.STATUS_FONT.render(status_text, True, status_color)
        self.__screen.blit(
            status_text_render,
            (
                self.__width / 2 - status_text_render.get_width() / 2,
                self.STATUS_TEXT_OFFSET,
            ),
        )
        # draw value text
        value_text_render = self.VALUE_FONT.render(
            value_text, True, self.VALUE_FONT_COLOR
        )
        self.__screen.blit(
            value_text_render,
            (
                self.__width / 2 - value_text_render.get_width() / 2,
                self.VALUE_TEXT_OFFSET,
            ),
        )

        Draws the text on the screen
        
Draws the text on the screen
Draws the text on the screen
def draw_text(self):
        status_text = f"It's {self.board.active_player.color_name}'s turn"
        player_1_active = self.board.player_1_is_active()
        status_color = self.PLAYER_1_COLOR if player_1_active else self.PLAYER_2_COLOR
        value = self.board.heuristic_value()
        status = self.board.status()
        value_text = f"Value: {value}"
        if status != Status.ONGOING:
            status_text = status.value
            player_1_won = status == Status.PLAYER_1_WINS
            status_color = self.PLAYER_1_COLOR if player_1_won else self.PLAYER_2_COLOR
        elif value != 0:
            winning_player_index = 1 - int(value > 0)
            winning_player = self.board.players[winning_player_index]
            value_text += f"  |  {winning_player.color_name} is winning"
        status_text_render = self.STATUS_FONT.render(status_text, True, status_color)
        self.__screen.blit(
            status_text_render,
            (
                self.__width / 2 - status_text_render.get_width() / 2,
                self.STATUS_TEXT_OFFSET,
            ),
        )
        value_text_render = self.VALUE_FONT.render(
            value_text, True, self.VALUE_FONT_COLOR
        )
        self.__screen.blit(
            value_text_render,
            (
                self.__width / 2 - value_text_render.get_width() / 2,
                self.VALUE_TEXT_OFFSET,
            ),
        )
def draw_text ( self ) : status_text = f"It's {self.board.active_player.color_name}'s turn" player_1_active = self . board . player_1_is_active ( ) status_color = self . PLAYER_1_COLOR if player_1_active else self . PLAYER_2_COLOR value = self . board . heuristic_value ( ) status = self . board . status ( ) value_text = f"Value: {value}" if status != Status . ONGOING : status_text = status . value player_1_won = status == Status . PLAYER_1_WINS status_color = self . PLAYER_1_COLOR if player_1_won else self . PLAYER_2_COLOR elif value != 0 : winning_player_index = 1 - int ( value > 0 ) winning_player = self . board . players [ winning_player_index ] value_text += f"  |  {winning_player.color_name} is winning" status_text_render = self . STATUS_FONT . render ( status_text , True , status_color ) self . __screen . blit ( status_text_render , ( self . __width / 2 - status_text_render . get_width ( ) / 2 , self . STATUS_TEXT_OFFSET , ) , ) value_text_render = self . VALUE_FONT . render ( value_text , True , self . VALUE_FONT_COLOR ) self . __screen . blit ( value_text_render , ( self . __width / 2 - value_text_render . get_width ( ) / 2 , self . VALUE_TEXT_OFFSET , ) , )
Draws the text on the screen
Draws the text on the screen
"""
        Draws the text on the screen
        """ # active player text
 # value text
 # print game end state if game is over
 # display winner
 # display winner color
 # draw status text
 # draw value text

self