Commit 3135258a authored by Eben Blaisdell's avatar Eben Blaisdell

dev change

parent cc655a5f
......@@ -27,8 +27,9 @@ function onMessage(dir, msg)
local otherCompassOffset = list[1]
local otherAgreesWith = tail(list)
if #otherAgreesWith >= #agreesWith then -- if the messager agrees with more other automata than you do
if (otherCompassOffset-dir)%2 ~= 0 then -- if you disagree with the proper direction dictated by the message
if (otherCompassOffset-dir)%2 ~= 0 then -- if you disagree with the proper direction dictated by the message
if #otherAgreesWith > #agreesWith then -- if the messager agrees with more other automata than you do
compassOffset = (compassOffset + 1)%2 -- swap compass offset
currentDir = (currentDir+1)%4 -- turn
otherAgreesWith[#otherAgreesWith+1] = id
......
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