http://pastebin.com/Fg79UNrj
basically im comparing the scores of the 4 players and deciding whether to send them into sudden death. if there are 2 pairs of players with the same score, then the higher pair gets sent into sudden death and the lower pair just receives the same rank (i changer winners[0] to 1 when that happens). If all four of them are tied, then all four of them receive the same score and it just says "4 way tie"(i change winners[0] to 2 when that happens).
here are the comments for the suddenDeathPlayers array so you can understand what i did there.
- Code: Select all
//suddenDeathPlayers comments
//0 defines which is the first player that isnt in the sudden death
//0 means that there are no players that are not in the sudden death
//1 or more means the player's playerNo thats in the sudden death
//1 defines the other player that is not in the sudden death
//0 means that there are no players that are not in the sudden death
//1 or more means the player's playerNo thats in the sudden death
//2 defines the amount of players in the sudden death (the new charAmount)
//3 defines the original charAmount
//4 defines the fist player's playerNo that is in the sudden death
//5 defines the second player's playerNo that is in the sudden death
//6 defines the third player's playerNo that is in the sudden death
//0 means that there is no third player in the sudden death