20.08.2008, 15:29
Stop, in your script:
What is when there are 5 Cops, 8 Ballas and 2 Groves and you choose cop?
case TEAM_COPS: if(count[0] > count[1] && count[0] > count[2])
=> count[0] > count[1] - NO, BUT - count[0] > count[2] - YES
So you would have a problem too i think, dont you ?
Because in your script the team must be bigger than BOTH other teams not if there is one team smaller than this one
I would say my script is right because he can only choose the smallest team... the team with the fewest players....
What is when there are 5 Cops, 8 Ballas and 2 Groves and you choose cop?
case TEAM_COPS: if(count[0] > count[1] && count[0] > count[2])
=> count[0] > count[1] - NO, BUT - count[0] > count[2] - YES
So you would have a problem too i think, dont you ?

Because in your script the team must be bigger than BOTH other teams not if there is one team smaller than this one

I would say my script is right because he can only choose the smallest team... the team with the fewest players....