40 lines
927 B
Plaintext
40 lines
927 B
Plaintext
%p
|
|
%b Status:
|
|
= @game.status
|
|
|
|
%p
|
|
%b Title:
|
|
= @game.title
|
|
|
|
- if @game.can_accomodate(current_user)
|
|
= link_to 'Join', game_join_path(@game)
|
|
|
|
- if @game.startable? && @game.already_has?(current_user)
|
|
= link_to 'Start', game_start_path(@game)
|
|
|
|
= link_to 'Debug Start', game_start_path(@game)
|
|
|
|
%p
|
|
%b Players:
|
|
%ol
|
|
- @game.players.each do |player|
|
|
%li
|
|
%strong= "My Turn " if @game.control_player == player
|
|
= player.user.email
|
|
= "Me" if player.user == current_user
|
|
- unless player.player_cards.empty?
|
|
%ul.cards
|
|
- player.player_cards.order(:value).each do |card|
|
|
%li
|
|
%label
|
|
= check_box_tag 'player_card_ids[]', card.id
|
|
= [card.rank, card.suit].join(' ')
|
|
|
|
%p
|
|
- if @game.control_user == current_user
|
|
= link_to 'Play Hand', '#'
|
|
|
|
= link_to 'Edit', edit_game_path(@game)
|
|
\|
|
|
= link_to 'Back', games_path
|