import pygame
 
# Define some colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
BROWN = (150,75,0)

#define your functions after the imports and global vars
def draw_tree(screen, x, y):
    pygame.draw.rect(screen, BROWN, [60+x, 170+y, 30, 45])
    pygame.draw.polygon(screen, GREEN, [[150+x,170+y],[75+x,20+y], [x,170+y]])
    pygame.draw.polygon(screen, GREEN, [[140+x,120+y], [75+x,y], [10+x,120+y]])


pygame.init()
 
# Set the width and height of the screen [width, height] and caption
size = (700, 500)
screen = pygame.display.set_mode(size) 
pygame.display.set_caption("My Game")

# Used to manage how fast the screen updates
clock = pygame.time.Clock()

background_image = pygame.image.load("saturn_family1.jpg").convert()

# -------- Main Program Loop -----------
done = False
while not done:
    # --- Main event loop
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            done = True
 
    # --- Game logic should go here
 
    # --- Screen-clearing code goes here, don't put any other drawing commands above here
    # If you want a background image, replace this clear with blit'ing the background image
    # screen.fill(BLACK)
    screen.blit(background_image, [0, 0])

    # --- Drawing code should go here
    draw_tree(screen, 0, 230)
    draw_tree(screen, 200, 230)
    draw_tree(screen, 400, 230)

    # --- Go ahead and update the screen with what we've drawn.
    pygame.display.flip()
 
    # --- Limit to 60 frames per second
    clock.tick(60)
 
# Close the window and quit.
pygame.quit()