mirror of
https://github.com/LDDestroier/CC/
synced 2025-01-23 07:26:55 +00:00
Fixed the no turning thing
How did I miss that!?
This commit is contained in:
parent
12f56c6a59
commit
d7cc9a6c2c
@ -51,8 +51,10 @@ local move = function(direction)
|
|||||||
turtle.forward()
|
turtle.forward()
|
||||||
pos.x = pos.x - math.cos(math.rad(pos.f * 90))
|
pos.x = pos.x - math.cos(math.rad(pos.f * 90))
|
||||||
elseif direction == "left" then
|
elseif direction == "left" then
|
||||||
|
turtle.turnLeft()
|
||||||
pos.f = (pos.f - 1) % 4
|
pos.f = (pos.f - 1) % 4
|
||||||
elseif direction == "right" then
|
elseif direction == "right" then
|
||||||
|
turtle.turnRight()
|
||||||
pos.f = (pos.f + 1) % 4
|
pos.f = (pos.f + 1) % 4
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user