getWinner

getWinner() → integer winner
Returns the winning team side. Must be called inside afterFight(). Returns -1 if the fight isn't over. The fight ends as soon as at most one team still has a living entity (chests aside): every living entity keeps its team in the fight, even one that never attacks, and a team whose turret is destroyed is out. If several teams are still alive after turn MAX_TURNS, it is a draw, except in group tournaments, where the team with the most life wins.

Returns the side of the winning team. Use it only in afterFight() (see Fight hooks). Returns -1 if the fight is not over.

Parameters
Return