forked from MDL29/LPH-cubito
Correction d'un bug avec la tortue qui ne sort plus
This commit is contained in:
parent
8307c65bd0
commit
ebf3b9a98e
|
@ -26,13 +26,14 @@ def fordward():
|
|||
"""
|
||||
Forward fonction
|
||||
"""
|
||||
print(f"x : {turtle.xcor()}, y : {turtle.ycor()}")
|
||||
turtle.forward(distance)
|
||||
if turtle.xcor() > 225 or turtle.xcor() < -225:
|
||||
|
||||
if turtle.xcor() > 226 or turtle.xcor() < -226:
|
||||
turtle.backward(distance)
|
||||
if turtle.ycor() > 225 or turtle.ycor() < -225:
|
||||
if turtle.ycor() > 226 or turtle.ycor() < -226:
|
||||
turtle.backward(distance)
|
||||
|
||||
|
||||
def left():
|
||||
"""
|
||||
Turn left fonction
|
||||
|
|
Loading…
Reference in New Issue