The main module (to manage grid) is Vexil.Battleground. It stores grid in Vexil.Agent and have functions to manipulate this grid. For example to store Bot or Flag structure. I wrote some function and split this module to some imports, so:
Vexil.Battleground imports: Vexil.Battleground.TeamUtils. TeamUtils (like a normal team) imports Vexil.Battleground.BotUtils and Vexil.Battleground.FlagUtils and both of them imports Vexil.Battleground.GridUtils.
Note: in your Ruby code Flag extends Bot, so it can move(!). I think it’s not a good to read your Ruby code, because Flag will not move at all.
In my code FlagUtils imports only functions for calculate position based on corner and spawn item. Ok, but why it’s all for Battleground? It’s simple. Bot and Flag do not need to calculate position from corner. I think my version is easiest to understand (if you know how import works).
More, flag do not think and bot do not see full grid, so they should not calculate coords. I know it’s not a bug, but it’s not easy to read - am I wrong?


















