summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/server.js b/server.js
index 69b3162..132c1cd 100644
--- a/server.js
+++ b/server.js
@@ -2603,13 +2603,13 @@ function do_resign(game_id, role, how) {
let result = "None"
+ let roles = get_game_roles(game.title_id, game.scenario, parse_game_options(game.options))
if (game.player_count === 2) {
- if (game.moves > 6) {
- let roles = get_game_roles(game.title_id, game.scenario, parse_game_options(game.options))
- for (let r of roles)
- if (r !== role)
- result = r
- }
+ for (let r of roles)
+ if (r !== role)
+ result = r
+ } else {
+ result = roles.filter(r => r !== role).join(", ")
}
state.state = "game_over"