
from tWrapper import tWrapper

class turtleWrapper(tWrapper):
    pass

def drawMain(dc_local, w, turtleWrapper=turtleWrapper):
    # top left corner is 0,0 and bottom right is some positive x and positive y
    # so the coordinate space is not like a Logo turtle where 0,0 is the center
    # of the screen

    # these are returning the screen dimensions, not the width of the dc
    #print dc_local.GetSize()
    #print dc_local.GetSizeTuple()
    #print dc_local.GetClippingBox()

    t1 = turtleWrapper(dc_local)
    t1.setBackColor('black')	# background is shared among all turtles
    t1.color('red')
    t1.showTurtle()
    t1.turtleDelay(1)
    t1.cls()  # get rid of any previous drawing
    
    t2 = turtleWrapper(dc_local)
    t2.color('green')
    t2.showTurtle()
    t2.width(2)
    t2.left(120)
    
    t3 = turtleWrapper(dc_local)
    t3.color('blue')
    #t3.showTurtle()
    t3.width(3)
    t3.left(240)

    t1.forward(50)
    t2.forward(50)
    t3.forward(50)
    # for loop below is equivelant, need a better way of doing
    # index range though
    nList = ['1', '2', '3']
    for i in nList:
        eval('t' + i + '.pu()')
        eval('t' + i + '.forward(50)')
        eval('t' + i + '.pd()')

    tList = [t1, t2, t3]
    for i in range(6):
        [t.fd(80) for t in tList]
        #for j in range(1000000): pass	# huge delay so we can see the turtle
        [t.rt(60) for t in tList]
        #for j in range(1000000): pass	# huge delay so we can see the turtle
    
