legend_of_peach.py
def run_game():
    """ Main game structure that runs the whole program """
    # Initialize pygame
    pygame.init()

    # Set up the hub
    hub = Hub()
    pygame.display.set_caption(hub.WINDOW_TITLE)
    pygame.display.set_icon(hub.WINDOW_ICON)

    while True:
        """ Game Loop, as long as this is true the game will run. """
        # Clear Screen
        hub.main_screen.fill(hub.BG_COLOR)

        # Decide what screen to display
        hub.display_screen()

        # Display the screen onto the window
        pygame.display.flip()
        dt = hub.CLOCK.tick(hub.FRAMERATE)
        hub.speed = 1 / float(dt)
 Main game structure that runs the whole program 
Main game structure that runs the whole program
Main game structure that runs the whole program
def run_game():
    pygame.init()
    hub = Hub()
    pygame.display.set_caption(hub.WINDOW_TITLE)
    pygame.display.set_icon(hub.WINDOW_ICON)
    while True:
        hub.main_screen.fill(hub.BG_COLOR)
        hub.display_screen()
        pygame.display.flip()
        dt = hub.CLOCK.tick(hub.FRAMERATE)
        hub.speed = 1 / float(dt)
def run_game ( ) : pygame . init ( ) hub = Hub ( ) pygame . display . set_caption ( hub . WINDOW_TITLE ) pygame . display . set_icon ( hub . WINDOW_ICON ) while True : """ Game Loop, as long as this is true the game will run. """ hub . main_screen . fill ( hub . BG_COLOR ) hub . display_screen ( ) pygame . display . flip ( ) dt = hub . CLOCK . tick ( hub . FRAMERATE ) hub . speed = 1 / float ( dt )
Main game structure that runs the whole program
Main game structure that runs the whole program
""" Main game structure that runs the whole program """ # Initialize pygame # Set up the hub """ Game Loop, as long as this is true the game will run. """ # Clear Screen # Decide what screen to display # Display the screen onto the window