def render(self):
        """ Tells everything to repaint themselves"""
        # Paint the background
        screen = pygame.display.get_surface()
        screen.fill(bg_color)

        # Paint the grid
        singleton_grid.paint()

        # Paint the buttons, resources, etc.
        singleton_interface.paint()

        # Update the display
        pygame.display.flip()
示例#2
0
def new_render(flag= True):
    ''' Tells everything to repaint themselves'''
    from grid import singleton_grid
    from interface import singleton_interface
    # Paint he background
    screen = pygame.display.get_surface()
    screen.fill(bg_color)

    # Paint the grid
    singleton_grid.paint()

    # Paint the buttons, resources, etc.
    singleton_interface.paint(flag)

    # Update the display
    pygame.display.flip()