game.py
def draw(self, canvas):
        """
        Draws the card in the canvas
        """
        # set the image
        image = self.get_image()
        # a pair of coordinates giving the position of the center of the image
        center_source = self.get_center_source()
        # if not shown, set the image to be drawn as the back image
        if not self.is_shown:
            image = self.get_back_image()
            center_source = self.get_center()
        # a pair of integers giving the size of the original image
        width_height_source = self.get_size()
        # a pair of screen coordinates specifying where the center of the image should be drawn on the canvas
        center_dest = self.get_position()
        # a pair of integers giving the size of how the images should be drawn
        width_height_dest = self.get_size()
        canvas.draw_image(image, center_source, width_height_source, center_dest, width_height_dest)

        Draws the card in the canvas
        
Draws the card in the canvas
Draws the card in the canvas
def draw(self, canvas):
        image = self.get_image()
        center_source = self.get_center_source()
        if not self.is_shown:
            image = self.get_back_image()
            center_source = self.get_center()
        width_height_source = self.get_size()
        center_dest = self.get_position()
        width_height_dest = self.get_size()
        canvas.draw_image(image, center_source, width_height_source, center_dest, width_height_dest)
def draw ( self , canvas ) : image = self . get_image ( ) center_source = self . get_center_source ( ) if not self . is_shown : image = self . get_back_image ( ) center_source = self . get_center ( ) width_height_source = self . get_size ( ) center_dest = self . get_position ( ) width_height_dest = self . get_size ( ) canvas . draw_image ( image , center_source , width_height_source , center_dest , width_height_dest )
Draws the card in the canvas
Draws the card in the canvas
"""
        Draws the card in the canvas
        """ # set the image # a pair of coordinates giving the position of the center of the image # if not shown, set the image to be drawn as the back image # a pair of integers giving the size of the original image # a pair of screen coordinates specifying where the center of the image should be drawn on the canvas # a pair of integers giving the size of how the images should be drawn
self
canvas