%- include('header', { title: "All Public Games", refresh: (user ? 300 : 0) }) %>
ID | Title | Scenario | Owner | Description | Created | Players | <% if (open_games.length > 0) { %> <% open_games.forEach((row) => { %> |
---|---|---|---|---|---|---|---|
<%= row.game_id %> | <%= row.title_name %> | <%= row.scenario %> | <%= row.owner_name %> | <%= row.description %> | <%= row.ctime %> | <%= row.players.join(", ") %> | Join <% }); } else { %> |
No open games. <% } %> |
ID | Title | Scenario | Description | Changed | Players | Active | <% if (active_games.length > 0) { %> <% active_games.forEach((row) => { %> | |||
---|---|---|---|---|---|---|---|---|---|---|
<%= row.game_id %> | <%= row.title_name %> | <%= row.scenario %> | <%= row.description %> | <%= row.mtime %> | <%= row.players.join(", ") %> <% if (row.your_turn) { %> | <%= row.active %><% } else { %> | <%= row.active %><% } let me = row.players.reduce((n,p) => n + (p === user.name ? 1 : 0), 0); if (me == 1) { %> | Play<% } else if (me > 1) { %> | Play<% } else { %> | View<% } %> <% }); } else { %> |
No active games. <% } %> |