Logic for whether game has started
This commit is contained in:
parent
8de11ad6bb
commit
13049b9b3d
@ -42,21 +42,24 @@
|
|||||||
// Show the card TODO hide values of cards of other players
|
// Show the card TODO hide values of cards of other players
|
||||||
= [card.rank, card.suit].join(' ')
|
= [card.rank, card.suit].join(' ')
|
||||||
|
|
||||||
.table
|
-# TODO better logic, not in view
|
||||||
- if @game.current_hand
|
- unless @game.status == nil
|
||||||
%h1 Hand to beat
|
.table
|
||||||
- else
|
- if @game.current_hand
|
||||||
%h1 Open table
|
%h1 Hand to beat
|
||||||
%h2
|
- else
|
||||||
Played
|
%h1 Open table
|
||||||
- @game.plays.last.player_cards.each do |card|
|
%h2
|
||||||
= card.to_s
|
Played
|
||||||
|
- if @game.plays.count > 0
|
||||||
|
- @game.plays.last.player_cards.each do |card|
|
||||||
|
= card.to_s
|
||||||
|
|
||||||
.controls
|
.controls
|
||||||
- if @game.control_user == current_user
|
- if @game.control_user == current_user
|
||||||
// Play hand form
|
// Play hand form
|
||||||
= form_for @game, :url => play_hand_game_path(@game) do |f|
|
= form_for @game, :url => play_hand_game_path(@game) do |f|
|
||||||
// Provide id of current game
|
// Provide id of current game
|
||||||
-#= f.hidden_field :id
|
-#= f.hidden_field :id
|
||||||
= f.submit "Play Hand"
|
= f.submit "Play Hand"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user