VirtualTurtle/yervandsargsyan
VirtualTurtle/sus801
f1def turtle(coord, direction):f1def turtle(coord, direction):
2    x = coord[0]2    x = coord[0]
3    y = coord[1]3    y = coord[1]
n4    way = yield directionn4    direc = yield direction
5    while way:5    while direc:
6        if way == 'f':6        if direc == 'f':
7            if direction == 0:7            if direction == 0:
8                x += 18                x += 1
9            elif direction == 1:9            elif direction == 1:
10                y += 110                y += 1
11            elif direction == 2:11            elif direction == 2:
12                x -= 112                x -= 1
13            else:13            else:
14                y -= 114                y -= 1
n15        elif way == 'l':n15        elif direc == 'l':
16            direction = (direction+1) % 416            direction = (direction+1) % 4
17        else:17        else:
18            if direction == 0:18            if direction == 0:
19                direction = 319                direction = 3
20            elif direction == 1:20            elif direction == 1:
21                direction = 021                direction = 0
22            elif direction == 2:22            elif direction == 2:
23                direction = 123                direction = 1
24            else:24            else:
25                direction = 225                direction = 2
t26        way = yield(x, y)t26        direc = yield(x, y)
2727
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op