This content has been marked as final. Show 8 replies
create an array whose elements are your teams ("team1", "team2" etc). then use a custom array.sort() method to sort your teams based on their number of wins (or winning percentage).
thanks for the fast responce, Anychance you can give me a short example, I'm Not exactly sure how to do this.
Thanks again, I think I'm almost there, I have edited it to show my real code, I think the only question now is, how to I take the Array data and say what place.
by running this code I get the results: TS, TC, HC, TD, CTM
and this is correct, by number, so how do I get it to say:
1st Place: TS
2nd Place: TC
3rd Place: HC
4th Place: TD
5th Place: CTM
thanks Agian, I have attached my code.
///////////////// CODE ///////////////////////
after the sort method is applied teamA is reordered with the team having the most wins in the first position (index 0) etc.
so all I need is this then:
Works Great, Thanks Kglad, saved me a ton of useless coding
correct, and you're welcome.