summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-01-05 12:10:46 +0100
committerTor Andersson <tor@ccxvii.net>2024-01-05 12:10:53 +0100
commitbbde94883a3c7efb5e3b2e43041e6574661b4d94 (patch)
treed4e81339fd8f7c7b81b61ab6e2cfb35739099ad2
parent1c49a8cd29872ef5b8c2b9df222d054c9c3e7c85 (diff)
downloadserver-bbde94883a3c7efb5e3b2e43041e6574661b4d94.tar.gz
Handle resign in replay mode.
-rw-r--r--public/common/replay.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/public/common/replay.js b/public/common/replay.js
index c8c04ea..b6c5e84 100644
--- a/public/common/replay.js
+++ b/public/common/replay.js
@@ -100,7 +100,13 @@ function eval_action(s, item, p) {
case ".resign":
if (params.mode === "debug")
s.log.push([p, item_role.substring(0,2), item_action, null])
- return rules.resign(s, item_role)
+
+ s.state = "game_over"
+ s.active = "None"
+ s.victory = item_role + " resigned."
+ s.log.push("")
+ s.log.push(s.victory)
+ return s
default:
if (params.mode === "debug")
s.log.push([p, item_role.substring(0,2), item_action, item_arguments])