Status: <%= @match.status %>
Tournament stage: <%= @match.tournament_stage %>
<%# Match Status 0 => Created, waiting to start Match Status 1 => Match ready Match Status 2 => Match is running, waiting to finish Match Status 3 => Match finished, waiting for statistics to populate Match Status 4 => Match Totally done. Archived. Four views:- (status is Match status) A. Pairings, when status is 1 for either Host or Player Or when status is 2 for player B. A page the host will see if status is 2 OR 3 C. The Peer review page that the players will see if status is 3. D. The page everyone will see when status is 4. Note: The change of status from 2 to 3 for League of Legends is coming from League Data Pull (RIOT API) %>Winner: <%= @match.winner.users.collect{|u| u.user_name}.join(", ") %>
<% end %>Match is waiting to start.
<% end %> <% when 1 %> <%= raw @match.tournament_stage.tournament.sampling_method.camelcase.constantize.render_user_interaction(@match, current_user) %> <% when 2 %> <% users = []; @match.teams.each{|t| users.concat(t.users)}; %> <% if users.include? current_user %> <% @match.teams.each do |team| %> <% if team.users.include?(current_user) %>