# Arup Guha
# 6/11/2025
# Draws a smiley face!

import pygame, sys
from pygame.locals import *
import math

pygame.init()
DISPLAYSURF = pygame.display.set_mode((1000, 600))
pygame.display.set_caption("Smiley Face")

RED = (255,0,0)
GREEN = (0,255,0)

while True:

    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()

    # make a white background
    DISPLAYSURF.fill( (255,255,255) )

    # outside of the smiley face
    pygame.draw.circle(DISPLAYSURF, RED, (500, 300), 200, 5)

    # mouth
    pygame.draw.arc(DISPLAYSURF, RED, (400, 300, 200, 150), math.pi*7/6, math.pi*11/6, 5)

    # nose
    pygame.draw.line(DISPLAYSURF, RED, (500, 300), (550, 350), 5)
    pygame.draw.line(DISPLAYSURF, RED, (500, 350), (550, 350), 5)

    # outside of eyes
    pygame.draw.ellipse(DISPLAYSURF, RED, (400, 200, 50, 25), 3)
    pygame.draw.ellipse(DISPLAYSURF, RED, (550, 200, 50, 25), 3)

    pygame.draw.circle(DISPLAYSURF, GREEN, (425, 212), 12)
    pygame.draw.circle(DISPLAYSURF, GREEN, (575, 212), 12)
    pygame.display.update()
