From 9dae57e1414ac993925050a2fd297db7dbb338e3 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Fri, 31 Jan 2020 12:51:06 -0500 Subject: [PATCH] 8 man double elim cross brackets in the semis not quarter finals --- ...double_elimination_generate_loser_names.rb | 12 +++++----- app/views/static_pages/about.html.erb | 2 +- ...ination_eight_man_match_generation_test.rb | 8 +++---- .../double_elimination_run_through_test.rb | 24 +++++++++---------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/services/tournament_services/eight_man_double_elimination_generate_loser_names.rb b/app/services/tournament_services/eight_man_double_elimination_generate_loser_names.rb index c83584c..7b46554 100644 --- a/app/services/tournament_services/eight_man_double_elimination_generate_loser_names.rb +++ b/app/services/tournament_services/eight_man_double_elimination_generate_loser_names.rb @@ -18,11 +18,11 @@ class EightManDoubleEliminationGenerateLoserNames def conso_round_2(matches) matches.select{|m| m.bracket_position == "Conso Quarter"}.sort_by{|m| m.bracket_position_number}.each do |match| if match.bracket_position_number == 1 - match.loser1_name = "Loser of #{matches.select{|m| m.bracket_position_number == 4 and m.round == 1 and m.bracket_position == "Quarter"}.first.bout_number}" - match.loser2_name = "Loser of #{matches.select{|m| m.bracket_position_number == 3 and m.round == 1 and m.bracket_position == "Quarter"}.first.bout_number}" + match.loser1_name = "Loser of #{matches.select{|m| m.bracket_position_number == 1 and m.round == 1 and m.bracket_position == "Quarter"}.first.bout_number}" + match.loser2_name = "Loser of #{matches.select{|m| m.bracket_position_number == 2 and m.round == 1 and m.bracket_position == "Quarter"}.first.bout_number}" elsif match.bracket_position_number == 2 - match.loser1_name = "Loser of #{matches.select{|m| m.bracket_position_number == 2 and m.round == 1 and m.bracket_position == "Quarter"}.first.bout_number}" - match.loser2_name = "Loser of #{matches.select{|m| m.bracket_position_number == 1 and m.round == 1 and m.bracket_position == "Quarter"}.first.bout_number}" + match.loser1_name = "Loser of #{matches.select{|m| m.bracket_position_number == 3 and m.round == 1 and m.bracket_position == "Quarter"}.first.bout_number}" + match.loser2_name = "Loser of #{matches.select{|m| m.bracket_position_number == 4 and m.round == 1 and m.bracket_position == "Quarter"}.first.bout_number}" end end end @@ -30,9 +30,9 @@ class EightManDoubleEliminationGenerateLoserNames def conso_round_4(matches) matches.select{|m| m.bracket_position == "Conso Semis"}.sort_by{|m| m.bracket_position_number}.each do |match| if match.bracket_position_number == 1 - match.loser1_name = "Loser of #{matches.select{|m| m.bracket_position_number == 1 and m.bracket_position == "Semis"}.first.bout_number}" - elsif match.bracket_position_number == 2 match.loser1_name = "Loser of #{matches.select{|m| m.bracket_position_number == 2 and m.bracket_position == "Semis"}.first.bout_number}" + elsif match.bracket_position_number == 2 + match.loser1_name = "Loser of #{matches.select{|m| m.bracket_position_number == 1 and m.bracket_position == "Semis"}.first.bout_number}" end end end diff --git a/app/views/static_pages/about.html.erb b/app/views/static_pages/about.html.erb index c26b471..c48a265 100644 --- a/app/views/static_pages/about.html.erb +++ b/app/views/static_pages/about.html.erb @@ -61,7 +61,7 @@

Double Elimination Information

-

Right now, double elimination brackets only support 8 and 16 man brackets (4-16 wrestlers).

+

Right now, double elimination brackets only support 8 and 16 man brackets (4-16 wrestlers). Cross bracketing will happen every other round. 16 man in quarter finals, 8 man in semi finals.

Double elimination scoring