Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Feedback: Library Tactics (Lua)

Its very-crazy level))) I longely dont understand what i do wrong? In another attempt all it happened by itself. Level better confined to luck than to study …

1 Like

Why do you think so? My code wins on this level every time.

Then I will try once again to start with a good code option.

Last variant which was victorious :

local angle = (3.14159265359 2 soldierIndex) / numSoldiers
local defendPos = {x= 41, y= 40}
defendPos.x = defendPos.x +7math.cos(angle)
defendPos.y = defendPos.y +7
self:command(soldier, “defend”, defendPos)
if<20 then
hero:command(soldier, “move”, {x= 41, y= 40})

but now writes cycle error

One code - two result=)