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)
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()
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()
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()
def grid(): line(-67, 200, -67, -200) line(67, 200, 67, -200) line(-200, -67, 200, -67) line(-200, 67, 200, 67)
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)
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)
def drawx(x, y): b.line(x, y, x + 133, y + 133) b.line(x, y + 133, x + 133, y)