From 29e0524e7122ec48a7250bd1d7ff58c5c149191b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 24 Feb 2024 17:59:50 +0100 Subject: Don't clear board if dominance check ends the game. --- rules.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rules.js b/rules.js index 69025e2..b695195 100644 --- a/rules.js +++ b/rules.js @@ -3003,12 +3003,6 @@ function do_dominance_check(reason) { assign_vp([3, 1], score, score.slice()) } - // Clear the board. - if (success) { - for (let i = 0; i < 36; ++i) - game.pieces[i] = 0 - } - // Check instant victory let vps = game.players.map(pp => pp.vp).sort((a,b)=>b-a) if (vps[0] >= vps[1] + 4) @@ -3017,6 +3011,12 @@ function do_dominance_check(reason) { if (final) return goto_pause_game_over() + // Clear the board. + if (success) { + for (let i = 0; i < 36; ++i) + game.pieces[i] = 0 + } + game.events = {} for (let p = 0; p < game.players.length; ++p) game.players[p].events = {} -- cgit v1.2.3