<h1>Listing matches</h1>

<table>
  <tr>
    <th>Player1</th>
    <th>Player1 score</th>
    <th>Player2</th>
    <th>Player2 score</th>
    <th>Round</th>
    <th>Duel1</th>
    <th>Duel2</th>
    <th>Duel3</th>
    <th>Tournament</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @matches.each do |match| %>
  <tr>
    <td><%= match.player1 %></td>
    <td><%= match.player1_score %></td>
    <td><%= match.player2 %></td>
    <td><%= match.player2_score %></td>
    <td><%= match.round %></td>
    <td><%= match.duel1 %></td>
    <td><%= match.duel2 %></td>
    <td><%= match.duel3 %></td>
    <td><%= match.tournament %></td>
    <td><%= link_to 'Show', match %></td>
    <td><%= link_to 'Edit', edit_match_path(match) %></td>
    <td><%= link_to 'Destroy', match, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Match', new_match_path %>
