%- include('header', { title: "Rally the Troops!", refresh: (active_games.length > 0 ? 300 : 0) }) %>
Welcome, <%= user.name %>!
Your mail address is <%= user.mail %>.
Logout <% if (open_games.length > 0) { %>
ID | Game | Scenario | Players | Description | Created | <% open_games.forEach((row) => { %> |
---|---|---|---|---|---|---|
<%= row.game_id %> | <%= row.title_name %> | <%= row.scenario %> | <%= row.players.join(", ") %> | <%= row.description %> | <%= row.ctime %> | Join <% }); %> |
ID | Game | Scenario | Players | Description | Changed | Turn | <% active_games.forEach((row) => { %> | ||
---|---|---|---|---|---|---|---|---|---|
<%= row.game_id %> | <%= row.title_name %> | <%= row.scenario %> | <%= row.players.join(", ") %> | <%= row.description %> | <%= row.mtime %> <% if (row.your_turn) { %> | <%= row.active %><% } else { %> | <%= row.active %><% } if (row.players.reduce((n,p) => n + (p === user.name ? 1 : 0), 0) == 1) { %> | Play<% } else { %> | Play<% } %> <% }); %> |
ID | Game | Scenario | Players | Description | Finished | Result | <% finished_games.forEach((row) => { %> |
---|---|---|---|---|---|---|---|
<%= row.game_id %> | <%= row.title_name %> | <%= row.scenario %> | <%= row.players.join(", ") %> | <%= row.description %> | <%= row.mtime %> | <%= row.result %> | View <% }); %> |
You don't have any current or finished games. <% } %>