# Allison Obourn
# CSC 110, Spring 2018
# Lecture 10

# This program draws cars of different sizes at
# different locations

# WARNING: this program is incomplete and doesn't work right yet.
#          We will finish it next lecture.

from DrawingPanel import *

def main():
    panel = DrawingPanel(400, 100, background="light gray")
    draw_car(panel, 10, 30, 100)
    draw_car(panel, 150, 10, 50)

# Takes a DrawingPanel, x coordinate (int), y coordinate (int)
# and size as parameters. Draws a car whose upper left corner is at
# the x, y location and has an overall width of size.
def draw_car(p, x, y, size):
    p.fill_rect(x, y, size, size // 2, "black")
      
    p.fill_oval(x + 10, y + 40, size // 5, size // 5, "red")
    p.fill_oval(x + 70, y + 40, size // 5, size // 5, "red")
        
    p.fill_rect(x + 70, y + 10, 30, 20, "cyan")

main()
