C#void SortPlayers(string winnerName){ int winnerIndex = playerNames.IndexOf(winnerName); int aboveWinnerIndex = winnerIndex - 1; string aboveWinnerName = playerNames[aboveWinnerIndex]; while (aboveWinnerIndex > 0 && playerWins[winnerName] > playerWins[aboveWinnerName]) { aboveWinnerIndex--; aboveWinnerName = playerNames[aboveWinnerIndex]; } playerNames[winnerIndex] = aboveWinnerName; playerNames[aboveWinnerIndex] = winnerName; UpdatePlayerList();}