def update(self):
        """
        Update the screens contents in every loop.
        """
        # this is not really neccesary because the surface is black after initializing
        self.corners.fill(BLACK)
        self.corners.draw_dot((0, 0), self.colors[0])
        self.corners.draw_dot((self.screen.width - 1, 0), self.colors[0])
        self.corners.draw_dot((self.screen.width - 1, self.screen.height - 1),
                              self.colors[0])
        self.corners.draw_dot((0, self.screen.height - 1), self.colors[0])

        self.lines.fill(BLACK)
        self.lines.draw_line((1, 0), (self.lines.width - 1, 0), self.colors[1])
        self.lines.draw_line((0, 1), (0, self.lines.height - 1), self.colors[3])
        self.lines.draw_line((0, 0), (self.lines.width - 1,
                                      self.lines.height - 1), self.colors[2])

        self.rects.fill(BLACK)
        self.rects.draw_rect((0, 0), (int(self.rects.width / 2) - 1,
                                      self.rects.height),
                             self.colors[2], self.colors[3])
        self.rects.draw_rect((int(self.rects.width / 2) + 1, 0),
                             (int(self.rects.width / 2) - 1,
                              self.rects.height),
                             self.colors[3], self.colors[2])

        self.circle.fill(BLACK)
        radius = int(min(self.circle.width, self.circle.height) / 2) - 1
        self.circle.draw_circle((int(self.circle.width / 2) - 1,
                                 int(self.circle.height / 2) - 1), radius,
                                self.colors[4], self.colors[5])

        self.filled.fill(self.colors[6])
def update ( self ) : self . corners . fill ( BLACK ) self . corners . draw_dot ( ( 0 , 0 ) , self . colors [ 0 ] ) self . corners . draw_dot ( ( self . screen . width - 1 , 0 ) , self . colors [ 0 ] ) self . corners . draw_dot ( ( self . screen . width - 1 , self . screen . height - 1 ) , self . colors [ 0 ] ) self . corners . draw_dot ( ( 0 , self . screen . height - 1 ) , self . colors [ 0 ] ) self . lines . fill ( BLACK ) self . lines . draw_line ( ( 1 , 0 ) , ( self . lines . width - 1 , 0 ) , self . colors [ 1 ] ) self . lines . draw_line ( ( 0 , 1 ) , ( 0 , self . lines . height - 1 ) , self . colors [ 3 ] ) self . lines . draw_line ( ( 0 , 0 ) , ( self . lines . width - 1 , self . lines . height - 1 ) , self . colors [ 2 ] ) self . rects . fill ( BLACK ) self . rects . draw_rect ( ( 0 , 0 ) , ( int ( self . rects . width / 2 ) - 1 , self . rects . height ) , self . colors [ 2 ] , self . colors [ 3 ] ) self . rects . draw_rect ( ( int ( self . rects . width / 2 ) + 1 , 0 ) , ( int ( self . rects . width / 2 ) - 1 , self . rects . height ) , self . colors [ 3 ] , self . colors [ 2 ] ) self . circle . fill ( BLACK ) radius = int ( min ( self . circle . width , self . circle . height ) / 2 ) - 1 self . circle . draw_circle ( ( int ( self . circle . width / 2 ) - 1 , int ( self . circle . height / 2 ) - 1 ) , radius , self . colors [ 4 ] , self . colors [ 5 ] ) self . filled . fill ( self . colors [ 6 ] )
Update the screens contents in every loop.