Thanks :)
I had in mind to put a number to each unit to signal the turn order, add a marker for the current unit and write the starting team in the turn counter, but i ran out of time.
The team with the most energy (sum of the units in the team) goes first. Then at the start of a turn, the units are sorted by the current energy and resolve their abilities in order until no ability can be resolved. In that case the turn is passed.