<% if @tournament.tournament_type == "Pool to bracket" %>

<%= @tournament.name %> - <%= @weight.max %> Bracket

<% @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} %> <% @wrestlers = Wrestler.where(weight_id: @weight.id) %> <% @pools = @weight.pool_rounds(@matches) %> <%= render 'pool' %> <% if @weight.pool_bracket_type == "twoPoolsToFinal" %> <%= render 'twoPoolFinalBracket' %> <% end %> <% if @weight.pool_bracket_type == "twoPoolsToSemi" %> <%= render 'twoPoolSemiBracket' %> <% end %> <% if @weight.pool_bracket_type == "fourPoolsToQuarter" %> <%= render 'fourPoolQuarterBracket' %> <% end %> <% if @weight.pool_bracket_type == "eightPoolsToQuarter" %> <%= render 'fourPoolQuarterBracket' %> <% end %> <% if @weight.pool_bracket_type == "fourPoolsToSemi" %> <%= render 'fourPoolSemiBracket' %> <% end %>
<% elsif @tournament.tournament_type.include? "Modified 16 Man Double Elimination" %>

<%= @tournament.name %> - <%= @weight.max %> Bracket

<%= render 'modified_sixteen_man_double_elimination_bracket' %>
<% elsif @tournament.tournament_type.include? "Regular Double Elimination" %> <%= render 'double_elimination_bracket' %> <% end %>