x = 0
y = 0
z = 0
f = 0



function getLocationInput()
print("X?")
x = read()
print("Y?")
y = read()
print("Z?")
z = read()
print("F?")
f = read()
end

function pivotRight()
turtle.turnRight()
if f == 3 then
f = 0
else
f = f + 1
end
end

function goForward()
if turtle.forward() == true then
  if f==0 then
  z = z+1
  end
  if f==1 then
  x = x-1
  end
  if f==2 then
  z = z-1
  end
  if f==3 then
  x = x+1
  end
  return true
  end
end    

pivotRight()
goForward()
