<commit_before><center class="container main-body custom-well">
  <h1>实时战况</h1>
  <ul class="users">
    <% @battles.each do |battle| %>
      <% if battle.defender && battle.attacker && battle.defender.user && battle.attacker.user%>
        <li>
          <span class="col-md-2">
            <div class="battle-star">
              <%= battle.starers.count %><br>
              赞
            </div>
          </span>
          <span class="col-md-8 battle-info">
            <div class="battle-info-time">
              <%= time_ago_in_words(battle.time) + "前" %><br>
            </div>
            <div class="battle-info-double">
              <%= link_to battle.attacker.user.name, battle.attacker.user %> ::
              <%= link_to battle.attacker.name, battle.attacker %>
              攻击
              <%= link_to battle.defender.user.name, battle.defender.user %> ::
              <%= link_to battle.defender.name, battle.defender %>
              <% if battle.winner_id == battle.attacker_id %>
                <span style="color:red;">
                  <% unless battle.score.nil? %>
                    成功, 积分+
                    <%= battle.score  %>
                  <% end %>
                </span>
              <% elsif battle.winner_id.nil? %>
                平局
              <% else %>
                <span style="color:green;">
                <% unless battle.score.nil? %>
                  失败, 积分-
                  <%= battle.score  %>
                <% end %>
              <% end %>
            </div>
          </span>
          <span class="col-md-2">
            <br>
            <%= link_to "去观战", battle , :class => "btn btn-sm custom-btn pull-right" %>
          </span>
        </li>
      <% end %>
    <% end %>
  </ul>
  <%= paginate @battles, :outer_window => 2 %>
</center><commit_msg>add score<commit_after><center class="container main-body custom-well">
  <h1>实时战况</h1>
  <ul class="users">
    <% @battles.each do |battle| %>
      <% if battle.defender && battle.attacker && battle.defender.user && battle.attacker.user%>
        <li>
          <span class="col-md-2">
            <div class="battle-star">
              <%= battle.starers.count %><br>
              赞
            </div>
          </span>
          <span class="col-md-8 battle-info">
            <div class="battle-info-time">
              <%= time_ago_in_words(battle.time) + "前" %><br>
            </div>
            <div class="battle-info-double">
              <%= link_to battle.attacker.user.name, battle.attacker.user %> ::
              <%= link_to battle.attacker.name, battle.attacker %>
              攻击
              <%= link_to battle.defender.user.name, battle.defender.user %> ::
              <%= link_to battle.defender.name, battle.defender %>
              <% if battle.winner_id == battle.attacker_id %>
                <span style="color:red;">
                  <% unless battle.score.nil? %>
                    成功, 积分 +
                    <%= battle.score %>
                  <% end %>
                </span>
              <% elsif battle.winner_id.nil? %>
                平局
              <% else %>
                <span style="color:green;">
                <% unless battle.score.nil? %>
                  失败, 积分 -
                  <%= battle.score %>
                <% end %>
              <% end %>
            </div>
          </span>
          <span class="col-md-2">
            <br>
            <%= link_to "去观战", battle , :class => "btn btn-sm custom-btn pull-right" %>
          </span>
        </li>
      <% end %>
    <% end %>
  </ul>
  <%= paginate @battles, :outer_window => 2 %>
</center>
{'fraction_non_alphanumeric': 0.16192560175054704, 'fraction_numerical': 0.0032822757111597373, 'mean_word_length': 1.3116308470290772, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1762190', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1118, 'n_words': 194}