diff options
-rw-r--r-- | public/style.css | 2 | ||||
-rw-r--r-- | server.js | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/public/style.css b/public/style.css index 1f6fdf6..330e8f4 100644 --- a/public/style.css +++ b/public/style.css @@ -169,7 +169,7 @@ article hr + p { font-style: italic; } .game_main img { display: block; height: 72px; - margin: 4px 0; + margin: 4px 0 4px 4px; border: 1px solid black; } @@ -1015,12 +1015,17 @@ function format_options(options) { function annotate_game(game, user_id) { let players = SQL_SELECT_PLAYERS_JOIN.all(game.game_id) let options = JSON.parse(game.options) + let roles = get_game_roles(game.title_id, game.scenario, options) if (game.options === '{}') game.human_options = "None" else game.human_options = format_options(options) + for (let i = 0; i < players.length; ++i) + players[i].index = roles.indexOf(players[i].role) + players.sort((a, b) => a.index - b.index) + game.is_ready = is_game_ready(game.title_id, game.scenario, options, players) let your_count = 0 |