# Allison Obourn
# CS 115, Autumn 2021
# Lab 2

# This program draws a brown bear's face. The bear has a pink nose
# and two big and tall eyes with a white background. The pupils
# appear to follow the mouse pointer around the screen as the user moves it.

from ECGUI import *

# the drawing that will be animated on the window
def repeat():
    # remove everything drawn previously 
    panel.clear()

    # head
    panel.fill_oval(50, 50, 300, 300, "brown")

    # ears
    panel.fill_oval(0, 25, 150, 150, "brown")
    panel.fill_oval(250, 25, 150, 150, "brown")

    # whites of the eyes
    panel.fill_oval(100, 100, 100, 110, "white")
    ppanel.fill_oval(200, 100, 100, 110, "white")

    # nose
    panel.fill_rect(160, 220, 80, 25, "pink")

    # eyeballs
    y = (panel.get_mouse_y() - 150) * 0.2
    x1 = panel.get_mouse_x() / 5
    x2 = panel.get_mouse_x() / 5
    panel.fill_oval(140 + x1, 150 + y, 20, 20, "black")
    panel.fill_oval(240 + x2, 150 + y, 20, 20, "black")

    

panel = drawing_panel(500, 400, "lightblue")
panel.animate(10, repeat)
