new team1, team2;//when player joins team1if(team1+2 > team2 && team2 <= team1)//player go to team2team2++;else//player go to team1team1++;