return true; }
// Sort pairs (using existing sort_pairs function) sort_pairs();
=== TIE-BREAKING VISUALIZATION === Total pairs created: 6 --- BEFORE SORTING --- Pair 1: Alice vs Bob Alice got 5 votes Bob got 3 votes Margin: Alice wins by 2 votes
// Feature: Visualize tie-breaking in sorted pairs void visualize_tie_breaking(void) { printf("\n=== TIE-BREAKING VISUALIZATION ===\n"); printf("Total pairs created: %i\n", pair_count);
// Display after sorting with tie information printf("\n--- AFTER SORTING (by victory strength) ---\n"); for (int i = 0; i < pair_count; i++) { int margin = preferences[pairs[i].winner][pairs[i].loser] - preferences[pairs[i].loser][pairs[i].winner]; printf("\nRank %i: ", i + 1); if (margin > 0) printf("STRONGEST - "); else if (margin == 0) printf("TIE - "); display_pair_votes(i); }