The source code of the referee can be found on github:
https://github.com/eulerscheZahl/TryAngle-Catch
Don't hesitate to change the viewer's options to help debug your code (

).
The game turn works as follows:
- Apply attack actions
- Move units
- Spawn units
- Add paths
- Remove paths
- Kill surrounded units
- Change ownership of triangles
Within the same type of action, actions are applied for both players simultaneously, but sequentially
for the
same player.
Example:
Player 1 wants to perform two attack actions
A1a and
A1b.
Player 2 wants to perform two attack actions
A2a and
A2b.
First
A1a and
A2a will be checked for being valid (the triangles in use are owned by the respective players and they have
enough units on each house) and applied if possible.
Then
A1b and
A2b will be processed in the same way. It's possible that the first pair of actions renders one of the later ones
invalid by killing units on a triangle that was supposed to be used later.
For the addition of new paths, the Euclidean distance is used as a tie breaker, giving higher
priority to shorter
distances.
This can make another path addition impossible due to crossing paths. The maps are generated in such a
way,
that there are no possible paths with identical distances that can cross each other.