From bbde94883a3c7efb5e3b2e43041e6574661b4d94 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 5 Jan 2024 12:10:46 +0100 Subject: Handle resign in replay mode. --- public/common/replay.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'public') 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]) -- cgit v1.2.3