Ejemplo n.º 1
0
def draw():
    color('black')
    width(5)
    for x in range(-200, 200, 40):
        for y in range(-200, 200, 40):
            if random()>0.5:
                line(x, y, x+40, y+40)
            else:
                line(x, y+40, x+40, y)
Ejemplo n.º 2
0
def draw():
	width(4)
	color("black")
	for x in range(-200, 200, 40):
		for y in range(-200, 200, 40):
			if random() > 0.5:
				line(x, y, x+40, y + 40)
			else:
				line(x, y+40, x+40, y)
	update()
Ejemplo n.º 3
0
def draw():
    color('black')
    width(5)
    for x in range(-200,200,40):
        for y in range(-200,200,40):
            # create matrix
            if random() > 0.5:
                line(x,y,x+40,y+40)
            else:
                line(x,y+40,x+40,y)
    update()
Ejemplo n.º 4
0
def grid():
    "Draw Connect Four grid."
    bgcolor('light blue')

    for x in range(-150, 200, 50):
        line(x, -200, x, 200)

    for x in range(-175, 200, 50):
        for y in range(-175, 200, 50):
            up()
            goto(x, y)
            dot(40, 'white')

    update()
Ejemplo n.º 5
0
def grid():
    line(-67, 200, -67, -200)
    line(67, 200, 67, -200)
    line(-200, -67, 200, -67)
    line(-200, 67, 200, 67)
Ejemplo n.º 6
0
def drawX(x, y):
    line(x, y, x + 133, y + 133)
    line(x, y + 133, x + 133, y)
def drawx(x, y):
    "Draw X player."
    line(x, y, x + 133, y + 133)
    line(x, y + 133, x + 133, y)
def grid():
    "Draw tic-tac-toe grid."
    line(-67, 200, -67, -200)
    line(67, 200, 67, -200)
    line(-200, -67, 200, -67)
    line(-200, 67, 200, 67)
Ejemplo n.º 9
0
def grid():
    b.line(-67, 200, -67, -200)
    b.line(67, 200, 67, -200)
    b.line(-200, -67, 200, -67)
    b.line(-200, 67, 200, 67)
Ejemplo n.º 10
0
def drawx(x, y):
    b.line(x, y, x + 133, y + 133)
    b.line(x, y + 133, x + 133, y)