<% alias BattleSnakeServer.Snake %>
<% snake = %Snake{} %>

<h2>Edit game</h2>

<%= form_for @changeset, game_path(@conn, :update, @game), [method: :put], fn f -> %>
<div>
  <%= label :f, :width %>
  <%= number_input f, :width %>
</div>

<div>
  <%= label f, :height %>
  <%= number_input f, :height %>
</div>

<%= inputs_for f, :snakes, [append: [snake]], fn g -> %>
<div>
  <%= label g, :url %>
  <%= url_input g, :url %>

  <%= label g, :delete %>
  <%= checkbox g, :delete %>
</div>
<% end %>

<div>
  <%= submit "Update game" %>
</div>
<% end %>


<%= link "Back", to: game_path(@conn, :index) %>

<% alias BattleSnakeServer.Snake %>
<% snake = %Snake{} %>

<h2>Edit game</h2>

<%= form_for @changeset, game_path(@conn, :update, @game), [method: :put], fn f -> %>
<div>
  <%= label :f, :width %>
  <%= number_input f, :width %>
</div>

<div>
  <%= label f, :height %>
  <%= number_input f, :height %>
</div>

<%= inputs_for f, :snakes, [append: [snake]], fn g -> %>
<div>
  <%= label g, :url %>
  <%= url_input g, :url %>

  <%= label g, :delete %>
  <%= checkbox g, :delete %>
</div>
<% end %>

<div>
  <%= submit "Update game" %>
</div>
<% end %>


<div>
  <%= link "Play", to: play_path(@conn, :show, @game) %>
</div>

<div>
  <%= link "Show", to: game_path(@conn, :show, @game) %>
</div>

<div>
  <%= link "Back", to: game_path(@conn, :index) %>
</div>

Add links to play and show from edit page
Add links to play and show from edit page
