%# /templates/imposter/imposter.html.ep % layout 'default'; % title 'Imposter Game'; <% content_for head => begin %> <% end %>
<% if ($game->{status} eq 'lobby') { %>

Imposter

<% if (@$lobby) { %> <% my $i = 0; %> <% for my $p (@$lobby) { %> <% $i++; %>
<%= $p %>
<% } %> <% } else { %>

Add players

<% } %>
<% if (@$lobby >= 3) { %>
<% for my $m (1..5) { %> <% } %>
<% } %>
<% } elsif ($game->{status} eq 'passing') { %>
<% my $current_name = $game->{players}->[$game->{current_index}]; %>
Current Turn

<%= $current_name %>

<% if (!$game->{show_secret}) { %>
<% } else { %> <% if ($game->{image_url} && $current_name ne $game->{imposter}) { %>
Secret Word Visual
<% } %>
<% if ($current_name eq $game->{imposter}) { %>
Your Hint
"<%= $game->{word_data}->{$lang}->{hint} %>"
<% } else { %>
Secret Word
<%= $game->{word_data}->{$lang}->{word} %>
<% } %>
<% } %>
<% } elsif ($game->{status} eq 'timer') { %>
<%= $game->{starter} %> <%= $lang eq 'en' ? 'Starts First' : 'เริ่มคนแรก' %>
00:00
<% } elsif ($game->{status} eq 'finished') { %>
<% if ($game->{image_url}) { %>
Secret Word Visual
<% } %>

The Imposter Was

<%= $game->{imposter} %>

The Secret Word Was

<%= $game->{word_data}->{en}->{word} %>

<%= $game->{word_data}->{th}->{word} %>

<% } %>