summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-12-11 23:14:35 +0100
committerTor Andersson <tor@ccxvii.net>2023-12-11 23:14:43 +0100
commitc83ee7db9b71fbc5e8ec55b4d75c7faecdd71c93 (patch)
treef7113b6f64df103f30ca4caeb1b729a81b1cd642
parent12508a861208256434c1a8f3991c6a15e9023cee (diff)
downloadvotes-for-women-c83ee7db9b71fbc5e8ec55b4d75c7faecdd71c93.tar.gz
fix automatic state selection (account for opponent cubes too!)
-rw-r--r--rules.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index f08c0fa..9c9c0d0 100644
--- a/rules.js
+++ b/rules.js
@@ -1329,7 +1329,7 @@ function auto_select_state() {
let most = -1, where = -1
for (let s of ANYWHERE) {
if (!(is_green_check(s) || is_red_x(s))) {
- let n = player_cubes(s)
+ let n = player_cubes(s) - opponent_cubes(s)
if (n > most) {
most = n
where = s