Commit c962c6e4 authored by Eben Blaisdell's avatar Eben Blaisdell

dev change

parent 3135258a
......@@ -11,18 +11,18 @@ function onTurn()
else
sendMessage(currentDir, constructMessage(currentDir))
currentDir = (currentDir + 2) % 4
print("turn around")
--print("turn around")
end
end
function constructMessage(dir)
print("agreesWith " .. strjoin(",", agreesWith))
--print("agreesWith " .. strjoin(",", agreesWith))
return (((dir+compassOffset)%2) .. "," .. strjoin(",", agreesWith))
end
function onMessage(dir, msg)
print("msg")
print(msg)
--print("msg")
--print(msg)
local list = strsplit(",", msg)
local otherCompassOffset = list[1]
local otherAgreesWith = tail(list)
......@@ -58,8 +58,8 @@ function mergeUnique(t1,t2) -- mine
out[#out+1] = t2[i]
end
end
print("merged")
print(out)
--print("merged")
--print(out)
return out
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment