Skip to content

Commit

Permalink
cleanup formatting in views for ttt game
Browse files Browse the repository at this point in the history
  • Loading branch information
armandofox committed Sep 7, 2023
1 parent b6c4f31 commit 5765c2e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions flipped-demos/ch03-saas/ttt/views/game.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

<% row = col = 0 %>
<% 0.upto(2) do |row| %>
<div class="row ">
<div class="row">
<% 0.upto(2) do |col| %>
<div class="col-3 text-center h1 border-primary
<%= 'border-bottom' if row != 2 %>
<%= 'border-right' if col != 2 %>">
<% square_num = row * 3 + col %>
<%= if (val = @game.board[square_num]).empty? then square_num else val end %>
<div class="col-3 text-center h1">
<div class="border-primary <%= 'border-bottom' if row!=2 %> <%= 'border-left' if col!=0 %>">
<% square_num = row * 3 + col %>
<%= if (val = @game.board[square_num]).empty? then square_num else val end %>
</div>
</div>
<% end %>
</div>
Expand Down

0 comments on commit 5765c2e

Please sign in to comment.