VirtualTurtle/Chosen__1
VirtualTurtle/chega_in_unix
n1def turtle(ab):n1def turtle(cd):
2    res = yield a2    res = yield c
3    while True:3    while True:
4        if res == 'f':4        if res == 'f':
n5            a = list(a)n5            c = list(c)
6            if (b == 0):6            if (d == 0):
7                a[0] += 17                c[0] += 1
8            if (b == 1):8            if (d == 1):
9                a[1] += 19                c[1] += 1
10            if (b == 2):10            if (d == 2):
11                a[0] -= 111                c[0] -= 1
12            if (b == 3):12            if (d == 3):
13                a[1] -= 113                c[1] -= 1
14            a = tuple(a)14            c = tuple(c)
15        if res == 'l':15        if res == 'l':
n16            b = (b + 1) % 4n16            d = (d + 1) % 4
17        if res == 'r':17        if res == 'r':
t18            b = (b + 3) % 4t18            d = (d + 3) % 4
19        res = yield a19        res = yield c
20# robo = turtle((0,0),0)
21# start = next(robo)
22# for c in "flfrffrffr":
23#     print(*robo.send(c))
2024
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op