# Arup Guha
# 7/12/2015
# Drawing using pygame
# Edited Slightly in 3/18/20 online class.

import pygame, sys
from pygame.locals import *

pygame.init()
DISPLAYSURF = pygame.display.set_mode((1000, 600))
pygame.display.set_caption("Drawing!")

black = pygame.Color(0,0,0)
red = pygame.Color(255,0,0)
green = pygame.Color(0,255,0)

pts = [(100,200), (200,200), (300,150), (150,100), (25, 175)]

x = 0
while True:

    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()

    DISPLAYSURF.fill(black)
	
	# Did this with x to show movement.
    pygame.draw.ellipse(DISPLAYSURF, green, (x, 300, 50, 150), 2)
    pygame.draw.line(DISPLAYSURF, red, (500, 0), (950, 590))
	
	# Moved where the line went.
    pygame.draw.line(DISPLAYSURF, pygame.Color(255,255,255), (0, 250), (950, 250))
	
	# Played with thickness of the rectangle here.
    pygame.draw.rect(DISPLAYSURF, pygame.Color(95, 12, 183), (50, 200, 700, 50), 4)
    
    pygame.draw.polygon(DISPLAYSURF, red, pts)
    pygame.display.update()
	
	# Change x so drawing is in a different place next time.
    x = (x+1)%1000
	
	# Slow stuff down by waiting!
    pygame.time.delay(100)
    
    
