A question about Magma Mountain

I was wondering, how is the winner decided if a game times out in Magma Mountain? It seems that damage is not the only factor.

actually the damage is not damage but the amount of orbs collected