<%- include('header', { title: "Rally the Troops!", refresh: (active_games.length > 0 ? 300 : 0) }) %>

Welcome, <%= user.name %>!

Your mail address is <%= user.mail %>.

<% if (open_games.length > 0) { %>

Open Games

IDGameScenarioPlayersDescriptionCreated <% open_games.forEach((row) => { %>
<%= row.game_id %> <%= row.title_name %> <%= row.scenario %> <%= row.player_names %> <%= row.description %> <%= row.ctime %> Join <% }); %>
<% } %> <% if (active_games.length > 0) { %>

Active Games

IDGameScenarioPlayersDescriptionChangedTurn <% active_games.forEach((row) => { %>
<%= row.game_id %> <%= row.title_name %> <%= row.scenario %> <%= row.player_names %> <%= row.description %> <%= row.mtime %> <% if (row.is_your_turn) { %><%= row.active_role %><% } else { %><%= row.active_role %><% } if (row.is_shared) { %>Enter<% } else { %>Play<% } %> <% }); %>
<% } %> <% if (finished_games.length > 0) { %>

Finished Games

IDGameScenarioPlayersDescriptionFinishedResult <% finished_games.forEach((row) => { %>
<%= row.game_id %> <%= row.title_name %> <%= row.scenario %> <%= row.player_names %> <%= row.description %> <%= row.mtime %> <%= row.result %> View <% }); %>
<% } %> <% if (open_games.length == 0 && active_games.length == 0 && finished_games.length == 0) { %>

You don't have any current or finished games. <% } %>