<commit_before><h2><%=@game.home%> vs <%=@game.away%></h2>

<%if is_admin%>
  <p>
  <%=form_for :suite, url: create_suite_path(:game_id => @game.id) do |f| %>
    <%= f.label 'Suite Number:' %>
    <%= f.text_field :suite_number %>
    <%=f.submit "Create Suite" %>
  <%end%>
</p>
<p>
  <%=form_for :prop_bet, url: create_prop_bet_path(:game_id => @game.id) do |f| %>
    <%= f.label 'Create Prop Bet:' %>
    <%= f.select :suite_id, options_for_select(@game.suites.map {|s| s.suite_number}), {include_blank: 'Suite number?'} %>
    <%=f.submit "Submit" %>
  <%end%>
</p>
<p>
  <%=form_for :hit_challenge, url: create_hit_challenge_path do |f| %>
    <%= f.label 'Create Hit Challenge:' %>
    <%= f.select :suite_id, options_for_select(@game.suites.map {|s| s.suite_number}), {include_blank: 'Suite number?'} %>
    <%=f.submit "Create" %>
  <%end%>
</p>
  <%= link_to "Edit Game", games_edit_path(@game) %>
  <%if @game.has_hit_challenge %>

    <h4>Hit Challenges: </h4>

    <%if @hit_challenges.count > 1%>
      <% @hit_challenges.each do |h|%>
        <li>
        <%= "Suite #{h.suite.suite_number}:" %>
        <%= link_to "Status", hit_status_path(h) %>
        <%= link_to "Play", play_hit_challenge_path(h) %>
        <%= form_for h, url: delete_hit_challenge_path(h), method: :delete do |f| %>
        <%= f.hidden_field :hit_challenge_id, value: h.id %>
        <%= f.submit "Delete" %>
      <%end%>
        </li>
      <%end%>
    <%else%>
      <%= "Suite #{@hit_challenges.first.suite.suite_number}:" %>
      <%= link_to "Status", hit_status_path(@hit_challenges.first) %>
      <%= link_to "Play", play_hit_challenge_path(@hit_challenges.first) %>
      <%= form_for @hit_challenges.first, url: delete_hit_challenge_path(@hit_challenges.first), method: :delete do |f| %>
        <%= f.hidden_field :hit_challenge_id, value: @hit_challenges.first.id %>
        <%= f.submit "Delete" %>
      <%end%>
    <%end%>
  <%end%>

  <%if @game.has_prop_bet%>

    <h4> Prop Bets:</h4>

    <%if @prop_bets.count > 1 %>
      <% @prop_bets.each do |prop| %>
        <li>
          <%= "Suite #{prop.suite.suite_number}:" %>
          <%=link_to "Status", prop_status_path(prop) %>
          <%=link_to "Play", show_prop_bet_path(prop) %>
          <%=link_to "Edit", edit_prop_path(prop) %>
          <%= form_for prop, url: delete_prop_bet_path(prop), method: :delete do |f| %>
            <%= f.hidden_field :prop_id, value: prop.id %>
            <%= f.submit "Delete" %>
          <%end%>
        </li>
      <%end%>
    <%else%>
      <li>
      <%="Suite #{@prop_bets.first.suite.suite_number}:" %>
      <%= link_to "Status", prop_status_path(@prop_bets.first) %>
      <%= link_to "Play", show_prop_bet_path(@prop_bets.first) %>
      <%=link_to "Edit", edit_prop_path(@prop_bets.first) %>
      <%= form_for @prop_bets.first, url: delete_prop_bet_path(@prop_bets.first), method: :delete do |f| %>
        <%= f.hidden_field :prop_id, value: @prop_bets.first.id %>
        <%= f.submit "Delete" %>
      <%end%>
      </li>
    <%end%>
  <%end%>
  <p>
    <li><%= link_to "Add Home Players", add_home_player_path(@game)%></li>
    <li><%= link_to "Add Away Players", add_away_player_path(@game)%></li>
  </p>
<%end%>
<h5> Total Hits: <%=@game.total_hits%>
<h4>Home Players:</h4>
<% @home_players.each do |p| %>
  <%= p.position%> -
  <%= p.name%>: <%= p.at_bat%><commit_msg>add form to update total hits<commit_after><h2><%=@game.home%> vs <%=@game.away%></h2>

<%if is_admin%>
  <p>
  <%=form_for :suite, url: create_suite_path(:game_id => @game.id) do |f| %>
    <%= f.label 'Suite Number:' %>
    <%= f.text_field :suite_number %>
    <%=f.submit "Create Suite" %>
  <%end%>
</p>
<p>
  <%=form_for :prop_bet, url: create_prop_bet_path(:game_id => @game.id) do |f| %>
    <%= f.label 'Create Prop Bet:' %>
    <%= f.select :suite_id, options_for_select(@game.suites.map {|s| s.suite_number}), {include_blank: 'Suite number?'} %>
    <%=f.submit "Submit" %>
  <%end%>
</p>
<p>
  <%=form_for :hit_challenge, url: create_hit_challenge_path do |f| %>
    <%= f.label 'Create Hit Challenge:' %>
    <%= f.select :suite_id, options_for_select(@game.suites.map {|s| s.suite_number}), {include_blank: 'Suite number?'} %>
    <%=f.submit "Create" %>
  <%end%>
</p>
  <%= link_to "Edit Game", games_edit_path(@game) %>
  <%if @game.has_hit_challenge %>

    <h4>Hit Challenges: </h4>

    <%if @hit_challenges.count > 1%>
      <% @hit_challenges.each do |h|%>
        <li>
        <%= "Suite #{h.suite.suite_number}:" %>
        <%= link_to "Status", hit_status_path(h) %>
        <%= link_to "Play", play_hit_challenge_path(h) %>
        <%= form_for h, url: delete_hit_challenge_path(h), method: :delete do |f| %>
        <%= f.hidden_field :hit_challenge_id, value: h.id %>
        <%= f.submit "Delete" %>
      <%end%>
        </li>
      <%end%>
    <%else%>
      <%= "Suite #{@hit_challenges.first.suite.suite_number}:" %>
      <%= link_to "Status", hit_status_path(@hit_challenges.first) %>
      <%= link_to "Play", play_hit_challenge_path(@hit_challenges.first) %>
      <%= form_for @hit_challenges.first, url: delete_hit_challenge_path(@hit_challenges.first), method: :delete do |f| %>
        <%= f.hidden_field :hit_challenge_id, value: @hit_challenges.first.id %>
        <%= f.submit "Delete" %>
      <%end%>
    <%end%>
  <%end%>

  <%if @game.has_prop_bet%>

    <h4> Prop Bets:</h4>

    <%if @prop_bets.count > 1 %>
      <% @prop_bets.each do |prop| %>
        <li>
          <%= "Suite #{prop.suite.suite_number}:" %>
          <%=link_to "Status", prop_status_path(prop) %>
          <%=link_to "Play", show_prop_bet_path(prop) %>
          <%=link_to "Edit", edit_prop_path(prop) %>
          <%= form_for prop, url: delete_prop_bet_path(prop), method: :delete do |f| %>
            <%= f.hidden_field :prop_id, value: prop.id %>
            <%= f.submit "Delete" %>
          <%end%>
        </li>
      <%end%>
    <%else%>
      <li>
      <%="Suite #{@prop_bets.first.suite.suite_number}:" %>
      <%= link_to "Status", prop_status_path(@prop_bets.first) %>
      <%= link_to "Play", show_prop_bet_path(@prop_bets.first) %>
      <%=link_to "Edit", edit_prop_path(@prop_bets.first) %>
      <%= form_for @prop_bets.first, url: delete_prop_bet_path(@prop_bets.first), method: :delete do |f| %>
        <%= f.hidden_field :prop_id, value: @prop_bets.first.id %>
        <%= f.submit "Delete" %>
      <%end%>
      </li>
    <%end%>
  <%end%>
  <p>
    <li><%= link_to "Add Home Players", add_home_player_path(@game)%></li>
    <li><%= link_to "Add Away Players", add_away_player_path(@game)%></li>
  </p>
<%end%>
<h5> Total Hits:
  <%=form_for @game, url: update_game_hits_path do |f| %>
    <%=f.text_field :total_hits%>
    <%=f.submit "Update Hits" %>
  <%end%>
<h4>Home Players:</h4>
<% @home_players.each do |p| %>
  <%= p.position%> -
  <%= p.name%>: <%= p.at_bat%>
{'fraction_non_alphanumeric': 0.2126428468103573, 'fraction_numerical': 0.003182409952263851, 'mean_word_length': 3.1801692865779927, 'pattern_counts': {'":': 0, '<': 202, '<?xml version=': 0, '>': 210, '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': '5603059', 'n_tokens_mistral': 3005, 'n_tokens_neox': 2682, 'n_words': 485}