gym_splendor_code/envs/graphics/splendor_gui.py
def draw_noble(self,
                       noble: Noble,
                       x_coord: int,
                       y_coord: int) -> None:
            """Draws a noble in the main window.

                    Parameters:
                    _ _ _ _ _ _
                    card: Card to draw.
                    x_coord: Horizontal coordinate (from top left corner)
                    y_coord: Vertical coordinate (from top left corner)
                    draw_buy_button: Determines if create a buy action button associated with this card.
                    draw_reserve_button: Determines if create a reserve action button associated with this card"""

            self.main_canvas.create_rectangle(x_coord, y_coord, x_coord + NOBLE_WIDTH,
                                              y_coord + NOBLE_HEIGHT)
            for position_index, color in enumerate(noble.price.non_empty_stacks()):
                position_x = x_coord + NOBLE_PRICE_BOX_X
                position_y = y_coord + NOBLE_PRICE_BOX_SHIFT * position_index + NOBLE_PRICE_BOX_Y
                self.main_canvas.create_rectangle(position_x, position_y,
                                                  position_x + NOBLE_PRICE_BOX_SIZE,
                                                  position_y + NOBLE_PRICE_BOX_SIZE,
                                                  fill=color_dict_tkiter[color])
                self.main_canvas.create_text(position_x + NOBLE_PRICE_VALUE_X,
                                             position_y + NOBLE_PRICE_VALUE_Y, font=NOBLE_PRICE_FONT,
                                             fill=NOBLE_PRICE_FONT_COLOR,
                                             text=str(noble.price.value(color)))
Draws a noble in the main window.

                    Parameters:
                    _ _ _ _ _ _
                    card: Card to draw.
                    x_coord: Horizontal coordinate (from top left corner)
                    y_coord: Vertical coordinate (from top left corner)
                    draw_buy_button: Determines if create a buy action button associated with this card.
                    draw_reserve_button: Determines if create a reserve action button associated with this card
Draws a noble in the main window.
Parameters:
card: Card to draw.
x_coord: Horizontal coordinate (from top left corner)
y_coord: Vertical coordinate (from top left corner)
draw_buy_button: Determines if create a buy action button associated with this card.
draw_reserve_button: Determines if create a reserve action button associated with this card
Draws a noble in the main window . Parameters : card : Card to draw . x_coord : Horizontal coordinate ( from top left corner ) y_coord : Vertical coordinate ( from top left corner ) draw_buy_button : Determines if create a buy action button associated with this card . draw_reserve_button : Determines if create a reserve action button associated with this card
def draw_noble(self,
                       noble: Noble,
                       x_coord: int,
                       y_coord: int) -> None:
            self.main_canvas.create_rectangle(x_coord, y_coord, x_coord + NOBLE_WIDTH,
                                              y_coord + NOBLE_HEIGHT)
            for position_index, color in enumerate(noble.price.non_empty_stacks()):
                position_x = x_coord + NOBLE_PRICE_BOX_X
                position_y = y_coord + NOBLE_PRICE_BOX_SHIFT * position_index + NOBLE_PRICE_BOX_Y
                self.main_canvas.create_rectangle(position_x, position_y,
                                                  position_x + NOBLE_PRICE_BOX_SIZE,
                                                  position_y + NOBLE_PRICE_BOX_SIZE,
                                                  fill=color_dict_tkiter[color])
                self.main_canvas.create_text(position_x + NOBLE_PRICE_VALUE_X,
                                             position_y + NOBLE_PRICE_VALUE_Y, font=NOBLE_PRICE_FONT,
                                             fill=NOBLE_PRICE_FONT_COLOR,
                                             text=str(noble.price.value(color)))
def draw_noble ( self , noble : Noble , x_coord : int , y_coord : int ) -> None : self . main_canvas . create_rectangle ( x_coord , y_coord , x_coord + NOBLE_WIDTH , y_coord + NOBLE_HEIGHT ) for position_index , color in enumerate ( noble . price . non_empty_stacks ( ) ) : position_x = x_coord + NOBLE_PRICE_BOX_X position_y = y_coord + NOBLE_PRICE_BOX_SHIFT * position_index + NOBLE_PRICE_BOX_Y self . main_canvas . create_rectangle ( position_x , position_y , position_x + NOBLE_PRICE_BOX_SIZE , position_y + NOBLE_PRICE_BOX_SIZE , fill = color_dict_tkiter [ color ] ) self . main_canvas . create_text ( position_x + NOBLE_PRICE_VALUE_X , position_y + NOBLE_PRICE_VALUE_Y , font = NOBLE_PRICE_FONT , fill = NOBLE_PRICE_FONT_COLOR , text = str ( noble . price . value ( color ) ) )
Draws a noble in the main window.
Draws a noble in the main window .
"""Draws a noble in the main window.

                    Parameters:
                    _ _ _ _ _ _
                    card: Card to draw.
                    x_coord: Horizontal coordinate (from top left corner)
                    y_coord: Vertical coordinate (from top left corner)
                    draw_buy_button: Determines if create a buy action button associated with this card.
                    draw_reserve_button: Determines if create a reserve action button associated with this card"""
self
noble
Noble
x_coord
int
y_coord
int