Initial release

This commit is contained in:
Francois JUMELLE
2021-05-03 22:32:40 +02:00
commit 20526d93c8
928 changed files with 452368 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
data = 'DG'
repeat = 10
rep = {'D':'DAGAGA', 'G':'GADADA', 'A': 'AA'}
for i in range(repeat):
data = "".join([rep[c] for c in data])
d = 0 #0=nord, 1=est, 2=sud, 3=ouest,
y = 0
x = 0
for c in data:
if c == 'A':
if d == 0:
y+=10
elif d == 1:
x+=10
elif d == 2:
y-=10
else:
x-=10
elif c == 'D':
d = (d+1)%4
else:
d = (d-1)%4
print(y,x)