diff --git a/libs/robot.lua b/libs/robot.lua index 0fc7ee8..70afb15 100644 --- a/libs/robot.lua +++ b/libs/robot.lua @@ -20,7 +20,7 @@ api.create = function(state, defaultStateFile) local mutateRobotPosition = function(isBackward) local incValue = 1 - if isBackward then invValue = -1 end + if isBackward then incValue = -1 end if state.dir == 'FORWARD' then state.z = state.z + incValue