-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstash
61 lines (61 loc) · 2.06 KB
/
stash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<% if @squares_values[1].nil? %>
<%= link_to 'Play', add_move_match_path(square: 1), method: :put if @match.is_my_turn?(current_user) && [email protected]_there_a_winner?%>
<% else %>
<%= @squares_values[1]%>
<% end %>
|
<% if @squares_values[2].nil? %>
<%= link_to 'Play', add_move_match_path(square: 2), method: :put if @match.is_my_turn?(current_user) && [email protected]_there_a_winner?%>
<% else %>
<%= @squares_values[2]%>
<% end %>
|
<% if @squares_values[3].nil? %>
<%= link_to 'Play', add_move_match_path(square: 3), method: :put if @match.is_my_turn?(current_user) && [email protected]_there_a_winner?%>
<% else %>
<%= @squares_values[3]%>
<% end %>
<br>
<% if @squares_values[4].nil? %>
<%= link_to 'Play', add_move_match_path(square: 4), method: :put if @match.is_my_turn?(current_user) && [email protected]_there_a_winner?%>
<% else %>
<%= @squares_values[4]%>
<% end %>
|
<% if @squares_values[5].nil? %>
<%= link_to 'Play', add_move_match_path(square: 5), method: :put if @match.is_my_turn?(current_user) && [email protected]_there_a_winner?%>
<% else %>
<%= @squares_values[5]%>
<% end %>
|
<% if @squares_values[6].nil? %>
<%= link_to 'Play', add_move_match_path(square: 6), method: :put if @match.is_my_turn?(current_user) && [email protected]_there_a_winner?%>
<% else %>
<%= @squares_values[6]%>
<% end %>
<br>
<% if @squares_values[7].nil? %>
<%= link_to 'Play', add_move_match_path(square: 7), method: :put if @match.is_my_turn?(current_user) && [email protected]_there_a_winner?%>
<% else %>
<%= @squares_values[7]%>
<% end %>
|
<% if @squares_values[8].nil? %>
<%= link_to 'Play', add_move_match_path(square: 8), method: :put if @match.is_my_turn?(current_user)&& [email protected]_there_a_winner?%>
<% else %>
<%= @squares_values[8]%>
<% end %>
|
<% if @squares_values[9].nil? %>
<%= link_to 'Play', add_move_match_path(square: 9), method: :put if @match.is_my_turn?(current_user)&& [email protected]_there_a_winner?%>
<% else %>
<%= @squares_values[9]%>
<% end %>
<br>
<% if @match.winner_id? %>
<% if @match.winner_id == current_user.id %>
You win!
<% else %>
<%= User.find(@match.winner_id).nickname%> wins!
<% end %>
<% end %>