# demonstrate code that uses Shape
# without knowing whether it is Square or Triangle

import turtle

def shape_placer(L):
    ''' (list-of-Shape) -> NoneType

    Place shapes in L and draw them.

    Assume shapes have area < 5000
    '''
    t = turtle.Turtle()
    # Every shape has move_to and draw methods
    for s in L:
        s.move_to(s.get_area() // 10, s.get_area() // 10)
        s.draw(t)

if __name__ == '__main__':
    # Notice that these import statements were not used in the implementation
    # of shape_placer
    from square import Square
    from triangle import Triangle
    from time import sleep
    L = [Square(10, 10, 10), Triangle(-10, 10, 20), Square(5, 5, 20), Triangle(10, 10, 60)]
    shape_placer(L)
    sleep(5)
    turtle.bye()
