<%- include('header', { title: "All Public Games", refresh: (user ? 300 : 0) }) %>

Open

IDTitleScenarioOwnerDescriptionCreatedPlayers <% 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. <% } %>

Active

IDTitleScenarioDescriptionChangedPlayersActive <% 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. <% } %>