Improve game show view
This commit is contained in:
parent
fe741b489c
commit
0e7a86bcd5
@ -46,23 +46,19 @@
|
|||||||
-# TODO better logic, not in view
|
-# TODO better logic, not in view
|
||||||
- unless @game.status == nil
|
- unless @game.status == nil
|
||||||
.table
|
.table
|
||||||
- if @game.play_to_beat && @game.player_to_beat.user != current_user
|
-# TODO better logic, not in view. Set play to beat = nil; instead of view logic
|
||||||
|
- if @game.play_to_beat && @game.player_to_beat != @game.current_player
|
||||||
- if @game.play_to_beat.play
|
- if @game.play_to_beat.play
|
||||||
%h1
|
%h1
|
||||||
Hand to beat
|
Hand to beat
|
||||||
- @game.play_to_beat.play.player_cards.each do |card|
|
%span.hand-type= @game.play_to_beat.play.hand_type
|
||||||
|
%div= @game.play_to_beat.play.to_s
|
||||||
|
-#- @game.play_to_beat.play.player_cards.each do |card|
|
||||||
= card.to_s
|
= card.to_s
|
||||||
= @game.play_to_beat.play.player.user.email
|
%span.player= @game.play_to_beat.play.player.user.email
|
||||||
- else
|
- else
|
||||||
%h1 Open table
|
%h1 Open table
|
||||||
|
|
||||||
%h2
|
|
||||||
Last Played
|
|
||||||
- if @game.plays.count > 0
|
|
||||||
- @game.plays.last.player_cards.each do |card|
|
|
||||||
= card.to_s
|
|
||||||
= @game.plays.last.player.user.email
|
|
||||||
|
|
||||||
.controls
|
.controls
|
||||||
- if @game.control_user == current_user
|
- if @game.control_user == current_user
|
||||||
// Play hand form
|
// Play hand form
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user